How to Open Visual Basic Through Microsoft Word

How to Open Visual Basic Through Microsoft Word thumbnail
Microsoft has included many Visual Basic sub-routines to make automation easy.

You can use Visual Basic code to automate tasks within Microsoft Word. By inserting a command button or link in your document, you can perform chores that would normally require several steps to complete with just one click. Visual Basic for Applications is already included with Microsoft Office, so there is no need to purchase additional programs to write your code.

Instructions

    • 1

      Open a document in Microsoft Word. This can be either a new or existing document.

    • 2

      Enable the security settings by following the instructions for the version of Microsoft Office you own.

      If you have Office 2007, click the "Microsoft Office" button and then select "Application Options." Click on the "Trust Center" tab and select "Trust Center Settings." Click the tab labeled "Macro Settings" and select the box for "Trust access to the VBA project object model." Click "OK" and then click the next "OK" button.

      If you have Office XP or Office 2003, select "Tools" from the menu bar, then click "Macro" from the drop-down menu. Click on "Security," which will open the "Macro Security" dialog box. Select the tab marked "Trusted Sources" and locate the "Trust access to Visual Basic Project" statement. Click on the box in front of the statement to place a check mark in the box. Click the "OK" button.

    • 3

      Press the "ALT" and the "F11" buttons simultaneously to open the Visual Basic editor.

    • 4

      Grant access to the Visual Basic program from the menu line in the Visual Basic editor. Select "Tools" and then "References." Scroll to the option "Microsoft Visual Basic for Applications Extensibility" and click on the box in front of it to place a check mark in the box.

Tips & Warnings

  • Security settings may have been enabled as part of your initial install with Microsoft Word 2000 and Microsoft Word 2002.

  • Depending on which version of Windows you have, the security options chosen at installation and whether your computer is networked, you may have to repeat all steps to grant permissions for each document.

  • If you are using a COM object to change your security settings, you may have to restart your application for the change to take effect.

Related Searches:

References

  • Photo Credit computer monitor with lots of mail image by patrimonio designs from Fotolia.com

Comments

You May Also Like

Related Ads

Featured