COM: Format fractions in MS Word.

Post your working scripts, libraries and tools.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

COM: Format fractions in MS Word.

07 Jan 2024, 18:04

G. Mayor has VBA code to do this here. The animation should show what it does.
I'm going to post two versions of this, since ComObjActive() only works _sometimes_ for me. One version uses it, and it often works. But sometimes something goes haywire. For that reason the second version uses @flyingDman's version of Word_Get(). Chances are the first version will work for you.

Note: The cursor needs to be inside the fraction or immediately after the last digit. Something like 32/28.3 is NOT going to work.

ComObjActive() version:
Spoiler
Word_Get() version:
Spoiler
Hotkey is hard-coded here as Ctrl-Win-Alt-f, pick something that won't interfere with your Word shortcuts.
Bugs likely exist.

Regards,
burque505
Attachments
fractions.gif
fractions.gif (58.29 KiB) Viewed 698 times

Return to “Scripts and Functions (v2)”

Who is online

Users browsing this forum: No registered users and 108 guests