Get Help for Visual Basic for Applications in Word

Microsoft Office Word 2003

  1. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  2. Click Microsoft Visual Basic Help Button image .
  3. In the Microsoft Visual Basic Help task pane, in the Search text box, type the subject for which you need help.
  4. Click Start searching Button image.

ShowTip

  • To browse through a list of all the Visual Basic methods, properties, functions, and objects for a particular Microsoft Office program in the Visual Basic Editor, click Object Browser Button image. In the list of libraries, click the library for the program you want.

ShowIf Microsoft Word displays a macro error

The macro error may have been caused by one of the following:

  • An argument contains a value that is not valid. A common cause of this problem is trying to gain access to an object that does not exist, for example Documents(5)when only three documents are open.
  • The method can't be used in the applied context. For example, some Range object methods do not work if the range doesn't contain a table.
  • An external error has occurred, such as a failure to read or write from a file.
  • A method or property can't be used because of security settings. For example, the properties and methods of the VBE object for manipulating the Microsoft Visual Basic for Applications code stored in a document are inaccessible by default.

For more information, search for the method, object, or property in Visual Basic Help.

ShowIf Word displays a message asking you to turn on trusted access to Visual Basic projects

The appearance of this message indicates that your Microsoft Visual Basic for Applications project does not have access to the Visual Basic object model. To allow this access, use the following procedure.

  1. On the Tools menu, point to Macro, and then click Security.
  2. On the Trusted Publishers tab, select the Trust access to Visual Basic Project check box.

Security  By allowing this access, macros in any documents that you open can access the core Visual Basic objects, methods, and properties. This represents a possible security hazard.