Microsoft KB Archive/209711

= Compile error running Pleading Wizard =

Article ID: 209711

Article Last Modified on 8/14/2007

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q209711



This article is a consolidation of the following previously available article: 261435



SYMPTOMS
When you try to create a new pleading document with the Pleading Wizard in Microsoft Word, you may receive one of the following error messages:

Compile error in hidden module: ThisDocument

Compile error: Only comments may appear after End Sub, End Function, or End Property



CAUSE
This problem occurs when the Require Variable Declaration check box is selected in the Visual Basic Editor.



WORKAROUND
To prevent this problem, click to clear the Require Variable Declaration check box before using the Pleading Wizard. To do this, follow these steps:
 * 1) In Microsoft Word, point to Macro on the Tools menu, and click Visual Basic Editor.
 * 2) In the Visual Basic Editor, click Options on the Tools menu.
 * 3) On the Editor tab of the Options dialog box, click to clear the Require Variable Declaration check box.
 * 4) Click OK to close the Options dialog box.
 * 5) On the File menu, click Close and Return to Microsoft Word.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.



MORE INFORMATION
The Require Variable Declaration check box determines whether explicit variable declarations are required in modules. Selecting this option adds the "Option Explicit" statement to the general declarations in any new module.

Additional query words: WD2000

Keywords: kbbug kbnofix KB209711

-

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

© Microsoft Corporation. All rights reserved.