-
Automating Japanese furigana
Hey guys, total VBA rookie here. (though I have ample experience in Ruby) What I want to do is very simple:- take a selection
- lookup the phonetic guide text for words in the selection
- apply them above
The PhoneticGuide method has the following arguments:
Range.PhoneticGuide(text, alignment, raise, font, etc)
However, the text is mandatory, and I can't find a way to lookup the appropriate text. One would have hoped that leaving text blank would automatically use the default phonetic guide, but alas no. Here is what I have:
[vba]Sub furigana()
'
' Furigana Macro
'
'
Dim text As String
Dim furi As String
With Selection
text = StrConv(Selection, vbHiragana)
furi = Application.GetPhonetic(text)
.Range.PhoneticGuide text:=furi, Alignment:= _
wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=8, FontName _
:="YOzFont04"
End With
End Sub[/vba]
How can I parse the selection to find the appropriate text argument? For some reason it poops out with 'method or data member not found." Thanks!
Last edited by Dr_Funkenste; 11-29-2007 at 12:04 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules