bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > Resetting Character Formatting in a Macro

Resetting Character Formatting in a Macro

Summary: Want your macro to get rid of the formatting applied to a selection of text? It’s easy enough to do using the Reset method, described in this tip. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)

One of the things that most people use macros for is to make short work of formatting. It takes a while to set up macros to handle formatting, but it saves time in the long run if you have a document of any length at all.

Word provides many different commands and functions that affect character formatting. One of those commands causes the character formatting of a text selection to be set to the default for your paragraph. This is the syntax for the Reset method, which is used if you are programming in VBA:

Selection.Font.Reset

As you can see, there is not much to this command. It simply and quickly resets character formatting. This macro code is equivalent to pressing Ctrl+Space Bar to reset character formatting manually.

Tip #771 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007


Great Idea! Uncover the many ways you can master the full potential of printing your documents. WordTips: Printing and Printers can help you get the most from both the printed page and your printer.

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)