Microsoft KB Archive/820533

= Description of EnforceStyle property in Word Visual Basic Help is incorrect in Word =

Article ID: 820533

Article Last Modified on 1/26/2007

-

APPLIES TO


 * Microsoft Office Word 2007
 * 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.



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.

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.

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:

Word 2003

 * 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.

Microsoft Office Word 2007

 * 1) Start Word 2007.
 * 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 Type words to search for box of the Word Help dialog box, type EnforceStyle property, and then click Search.
 * 5) In the Results list, click EnforceStyle Property.

Additional query words: Doc Err WD2007

Keywords: kbprb KB820533

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.