Software

A quick macro fix for Word's wavy lines

Create this simple macro so that your users can toggle Word's Mark Formatting Inconsistencies option on and off.

A few weeks ago, I discussed the wavy blue line that Word displays in response to an inconsistent format. It's one of those options that annoy a lot of users even though it's a helpful tool. Users who need the feature more often than not, but occasionally want to disable it, can add a quick macro button to the toolbar. First, you need a macro that toggles between the two states, enabled and disabled. Enter this macro in the ThisDocument module: Sub ToggleWavyLines() 'Toggle wavy blue lines. Options.ShowFormatError = _ Not (Options.ShowFormatError) End Sub After entering the macro, return to the document and add the macro to a toolbar, as follows:

  1. From the Tools menu, choose Customize.
  2. Click the Commands tab.
  3. In the Categories list, select Macros.
  4. Drag the macro ToggleWavyLines macro from the Commands list to a toolbar and release.
  5. Right-click the macro button and enter a more user-friendly name.
  6. Click Close to close the Customize dialog box.

Now, turning this option on and off takes just a quick click. Try it! If you're using Word 2007, add this macro to the Quick Access Toolbar (QAT) as follows:

  1. Click the QAT drop-down arrow and choose More Commands.
  2. From the Choose Commands From drop-down list, choose Macros.
  3. Highlight ToggleWavyLines and click Add.
  4. Click OK.

Just remember, this feature works only as you enter new text. If you disable it, the feature won't identify inconsistent formatting in existing text once you re-enable it. If users find this useful, consider providing quick access to macros that disable the options that use wavy lines to identify spelling and grammar errors. I don't advise combining all these toggle statements in the same macro because there's no way for the user to control which option is enabled and which is disabled — and they'll probably want more specific control. Just create quick macros using the following statements in the same form (using Not): ActiveDocument.ShowSpellingErrors = _ Not(ActiveDocument.ShowSpellingErrors) ActiveDocument.ShowGrammaticalErrors = _ Not(ActiveDocument.ShowGrammaticalErrors)

About

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Editor's Picks