Word: Toggle Keep Track of FormattingMay 2, 2011
I use the Keep Track of Formatting option in Word Options quite often. Mostly, I have it turned off, but if I get a new document to edit from one of my client’s authors, I’ll turn it on so I can see the usage of all the styles in the document (see: https://cybertext.wordpress.com/2008/05/12/word-2003-why-is-the-select-all-button-inactive-in-styles/).
Once I’ve found and rationalized all the document’s weird and wonderful styles into the standard set for the template, I turn off Keep Track of Formatting. If it’s a particularly long and complex document, I might do this a couple of times while editing the document.
So I needed a quick way to turn this setting on and off — without doing all the steps it takes to get to the check box.
You’d think this setting would be easy to identify in the long list of more than 1700 Word commands, wouldn’t you? Not so. It has a really obscure name that doesn’t seem to me to relate too much to its function: FormatScanning. And it’s not in that Commands list. I eventually found it by hunting Word’s VBA Help (it’s really hard to find something when you don’t know what it’s called!)
The first thing I tried was writing a VBA macro to turn this check box off:
Sub KeepTrackFormattingOptionOff() With Options .FormatScanning = False End With End Sub
Then I wrote another one to turn it on:
Sub KeepTrackFormattingOptionOn() With Options .FormatScanning = True End With End Sub
Next, I assigned two keyboard commands — one to each macro (Alt+8 and Alt+9) — so that I could run the macro without clicking deep into the Word Options or the Developer tab.
But I wasn’t happy with this. It’s not very elegant and now that I knew the command, I really wanted a toggle macro so I could assign a single keyboard combination to turn this function on (if it was off) or off (if it was on). I’m not a VBA coder, so I didn’t know how to merge these two functions into one.
So I asked Hamish Blunck, a fellow technical writer and Author-it Certified Consultant in Queensland, for some help. Here’s Hamish’s much more elegant solution:
Sub ToggleKeepTrackFormattingOption() Options.FormatScanning = Not (Options.FormatScanning) End Sub
I then assigned this macro to a keyboard command — Alt+8 (no reason, just because it’s available!) — and it works beautifully.
Thanks Hamish! I owe you a drink or two if we ever get to meet.
[Links last checked April 2011]