- On the Tools menu, point to Macro, and then click Visual Basic Editor.
- Click Microsoft Visual Basic Help .
- In the Microsoft Visual Basic Help task pane, in the Search text box, type the subject for which you need help.
- Click Start searching .
- 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 . In the list of libraries, click the library for the program you want.
If 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.
If 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.
- On the Tools menu, point to Macro, and then click Security.
- 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.