![]() Wouldn't it be faster to do the whole thing with replace? You wouldn't have to check every character. I would be tempted to go for easiest way to get the end result - at the end, simply do a replace of and with an empty string "". Tutorial 2: Sums, Subscripts & Superscripts. ![]() This creates an equation on your page with empty boxes for the numerator and the denominator. Select Subscript from the drop-down menu. To do this, use the Insert Inline Equation command from Words. In your screenshot, you make a choice for the fraction. ![]() In Word Online, type and select your text, and then click More Font Options (three dots). The selected characters appear in subscript. This code is working good for each character of superscript and subscript.īut, I am looking for VBA which insert tags before and after complete superscript/subscript word/letters.Ĭ 1 2H 2 2O 1 1 and x 2 3 + y 3 9 7 + x 6 7Ībove VBA is giving following Output C12H22O11 and x23 + 圓97 + 圆7īut I am looking for this output C12H22O11 and x23 + 圓97 + 圆7 Select the text you want to appear as subscript so it's highlighted. Public Sub MySubscriptSuperscript()įor Each myRange In ActiveDocument.StoryRanges I am trying to create VBA to insert before and after Supercript and subscript.
0 Comments
Leave a Reply. |