Good job, everyone.
Use this code to add furigana.
https://stackoverflow.com/questions/34602598/how-to-add-phonetic-guides-to-all-the-texts-at-once
How do I delete rubies on a VBA?
Thank you for your cooperation.
chopsticks
vba ms-word
You can remove rubies by specifying an empty string in the Text parameter of the Range.PhoneticGuide
method.For example, the ActiveDocument.Fields
property can be used to obtain the desired Range
object.
Delete all rubies in the subtext()
For Eachf In ActiveDocument.Fields
f.Select
Selection.Range.PhoneticGuide""
Next
End Sub
This property also contains non-rubi field codes, but the PhoneticGuide
method will corrupt the field codes.If you need to avoid such a case, you need to determine if it is true by using Field.Code.FormattedText
or Field.Type
.
See also
© 2024 OneMinuteCode. All rights reserved.