Word Quick Format Document | VBA Macro #3

Macro Intro

This is a Word Macro that will help you quickly format a document consistently without having to click all the typical formatting options. This macro can help prevent common mistakes and provide a more consistent formatting result. The macro is built to format only the selected content of the document. If nothing is selected, then the entire document is formatted. This code can be easily customized to meet your unique formatting needs!

See it in Action

Watch this video to see this macro in action.

Free Macro

Here is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Word 16.0 Object Library

Insider Content

Here is the Insider code for this macro. This code will allow you to run the quick format macro for all Word Documents found in the same folder as the Active Word Document. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Word 16.0 Object Library

Customization

These segments of code can be customized to personalize this macro.
If nothing is selected format the entire Word Document. WdSelectionType is used to determine what is currently selected in the Active Word Document check out all available Selection Types for Word here!
Update the Properties of the Font Object to get the behavior you want when formatting the entire Word Document. (Properties include but not limited to: Font Color, Font Size, Bold, Italic, Underline, Font Name, see all Properties here!)
If something is selected format that selection in the Word Document. WdSelectionType is used to determine what is currently selected in the Active Word Document check out all available Selection Types for Word here!
Update the Properties of the Font Object to get the behavior you want when formatting the current selection in the Word Document. (Properties include but not limited to: Font Color, Font Size, Bold, Italic, Underline, Font Name, see all Properties here!)
Jump to the beginning of the Word Document after running the macro. You can update this code line to get the finishing behave you want or remove this code line completely. Learn more about the Selection.HomeKey method for Word here! Check out all available HomeKey Unit options for Word here!
Search

First time using VBA?

The Developer Tab is an additional section of the ribbon when activated allows you access to Visual Basic in Applications like Access, Excel, Outlook, PowerPoint, Word.
Setup Now
Once the Developer Tab is available you will have the capability to update your security to allow Macros to run in the current application.
Setup Now
A sub of code is a collection of objects and variables. For the code to successfully run a library of references needs to be set.
Setup Now
Subscribe as an Insider to receive additional rights.
If you like our content and want to show your support tip us here!

Contact Us

Looking to improve your computer processes?
Leverage & Lean is here to help!

Powered By MemberPress WooCommerce Plus Integration

Free Macro

Start creating Less Clicks, More Results today!