Heinz M.
Heinz M.

Reputation: 694

How to edit a MS Word system macro

I use MS Word for Mac Version 16.45 with German as main language. I want to write furigana in Japanese. This is possible by using Phonetic Guides. However, this function has a well known bug (in Word for Mac only ). The furigana are positioned left above the kanji, even if you selected center position.

enter image description here

Selecting the field function of the kanji results in the lower string

{q \* jc2 \* "Font:UD Digi Kyokasho N-R" \* hps14 \o\ad(\s\up 13(しん),新)}

Changing the comma at the very end to a semicolon and deselecting the field function results in the correct result.

enter image description here

The VBA object catalog shows me, that the macro in charge is the Range.PhoneticGuide-Methode. It seems to me, that the parameter wdPhoneticGuideAlignmentCenter is set to a wrong value.

Fixing this bug shouldn't be a big deal, but:

Is it possible to edit the Range.PhoneticGuide-Methode? And where can I find the VBA code?

Upvotes: -1

Views: 186

Answers (2)

Rich Michaels
Rich Michaels

Reputation: 1713

You can't edit the method but you can use the method. Place the following in a VBA module in your Normal template and then you can execute it on the selection in your document.

Sub PhoneticGuide()
    Selection.Range.PhoneticGuide Text:="tray sheek", _
     Alignment:=wdPhoneticGuideAlignmentCenter, _
     Raise:=11, FontSize:=7
     
    'other alignment options
'     Alignment:=wdPhoneticGuideAlignmentLeft, _
'     Alignment:=wdPhoneticGuideAlignmentOneTwoOne, _
'     Alignment:=wdPhoneticGuideAlignmentRight, _
'     Alignment:=wdPhoneticGuideAlignmentRightVertical, _
'     Alignment:=wdPhoneticGuideAlignmentZeroOneZero, _

End Sub

I've included the available alignment options that you can experiment with to find the one that works for you. I copied the base code from the following Microsoft article, which you can use for further reference.

https://learn.microsoft.com/en-us/office/vba/api/word.range.phoneticguide

Upvotes: 0

Timothy Rylatt
Timothy Rylatt

Reputation: 7860

Unless you have written a macro to apply the Phonetic Guide there isn't a macro involved, so there isn't any VBA code to find.

If there is a bug then it is in Word and all you can do is report it to Microsoft.

Upvotes: 0

Related Questions