How to get the Ruby text from Phonetic Guide under Asian Layout of MS Word?

D

DaleL

Here is my macro to set the Phonetic Guide. However, instead of asking user
to input, I wonder if it possible to query the "Ruby text" from MS Word?
Thanks in advance.

Sub MacroPhonetic()
Dim str As String
'to set the selection range
Dim rngParagraph As Range
Set rngParagraph = Selection.Range
rngParagraph.SetRange Start:=rngParagraph.Start, _
End:=rngParagraph.End

'add the PhoneticGuide to selected range
If rngParagraph.Start <> rngParagraph.End Then

str = InputBox("Enter the Phonetic")
With Selection
.Start = rngParagraph.Start
.End = rngParagraph.End

.Range.PhoneticGuide Text:=str, _
Alignment:=wdPhoneticGuideAlignmentCenter, _
Raise:=13, FontSize:=10, FontName:= _
"Arial"
End With
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top