Description of EnforceStyle property in Word Visual Basic Help is incorrect in Word 2003 (820533)



The information in this article applies to:

  • Microsoft Office Word 2003

SYMPTOMS

When you use the EnforceStyle property in a Microsoft Visual Basic for Applications macro, the EnforceStyle property does not allow you to enforce style formatting restrictions as indicated in Microsoft Word Visual Basic Help.

CAUSE

This problem occurs because the Help file topic that describes the EnforceStyle property is incorrect.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

How Do I Enforce Style Restrictions in a Visual Basic for Applications Macro?

To enforce style restrictions in a document by using a Visual Basic for Applications macro, use the Protect property and its corresponding EnforceStyleLock parameter.

For more information about the Protect property, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Protect property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

What Does The EnforceStyle Property Really Do?

The EnforceStyle property in a Visual Basic for Applications macro only controls the selection of the Limit formatting to a selection of styles check box on the Protect Document task pane.

For more information about how to control formatting restrictions in a Word document, click Microsoft Word Help on the Help menu, type formatting restrictions in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Where Do I Find the Incorrect EnforceStyle Property Description?

The Visual Basic Help file describes the EnforceStyle property as the following:

EnforceStyle Property

Returns or sets a Boolean that represents whether formatting restrictions are enforced in a protected document.

expression.EnforceStyle

expression Required. An expression that returns a Document object.

Example

The following example turns on formatting restrictions in the active document.

ActiveDocument.EnforceStyle = True

To locate this incorrect help topic, follow these steps:
  1. Start Office Word 2003.
  2. In a new blank document, press ALT+F11 to start the Visual Basic Editor.
  3. On the Help menu, click Microsoft Visual Basic Help.
  4. In the Search box of the Visual Basic Help task pane, type EnforceStyle property, and then click Start Searching.
  5. In the Search Results task pane, click EnforceStyle Property.

Modification Type:MajorLast Reviewed:3/23/2006
Keywords:kbprb KB820533 kbAudEndUser