I run the below macro code that is capable of adding phonetic pinyin to all the selected Chinese text at once. However, that code can only add the ruby text using default settings for font and I need to modify the the font, positioning, and font size of the pinyin.
https://github.com/wuzhuoqing/alltextphonetic/blob/master/alltext.bas
At first, I tried to toggle the field codes to change the settings, and it worked. However, when I saved, exit, and re-opened it, only positioning and font size remained changed, the font was the same before I make changes via field codes.
For example, the original font of the ruby text is Times New Roman. I will change it into "DengXian" by toggling field codes. Then, the ruby text's font will be changed. However, once I save and reopen the document, the ruby text's font reverts back to "Times New Roman" instead of "DengXian".
Is there any solutions to it? Or, is it possible to make adjustments on the macro code so that it can abandon the ruby text's default settings and adopt my own? By the way, I am tired of using only Phonetic Guide because It would cost me much of time (The document contains more than 10000 words!)
Thank you!
Try to use the Document.Save method to make your changes permanent. The following example saves the active document if it has changed since it was last saved: