Article ID: 184981
Article Last Modified on 1/22/2007
APPLIES TO
- Microsoft Word 97 Standard Edition
This article was previously published under Q184981
SYMPTOMS
In Microsoft Word, when you attempt to run a WordBasic macro that has been converted to a Microsoft Word Visual Basic for Applications macro, you may receive the following error:
Also, while in the Visual Basic Editor, when you check the installed object libraries in the References dialog box (click References on the Tools menu) the Word object type library "Microsoft Word 8.0 Object Library" is missing.
CAUSE
If all of the symptoms described apply to you, and the compile error "Can't find project or library" occurs at command lines beginning with the WordBasic object, for example
x$ = WordBasic.GetFormResult$("Text1")
your computer may be infected with the TWNO.A macro virus.
WORKAROUND
If you suspect that your computer is infected with a macro virus, please see the following articles in the Microsoft Knowledge Base:
181079 What to Do If You Have a Macros Virus
163932 Frequently Asked Questions About Word Macros Viruses
For more information about macro virus protection software available from third-party vendors, click the following article number to see the article in the Microsoft Knowledge Base:
49500 List of Antivirus Software Vendors
After you have made sure you have eradicated all possible macro viruses from your computer, documents and templates, and/or you are sure your computer, documents and templates are not infected, follow these steps to fix the template containing the converted WordBasic macros:
- Open the template containing the converted WordBasic macros:
- On the File menu, click Open.
- In the Files Of Type list, click "Document Templates(*.dot)."
- Navigate to the folder containing the template.
- In the list of files, click to select the template and click OK.
NOTE: If you are prompted to Enable Macros, or Disable Macros, click Enable Macros.
- On the Tools menu, point to Macro, and then click Visual Basic Editor.
- In the Visual Basic editor, click Project Explorer on the View menu.
- In the Project Explorer window, click to select your template project.
- On the Tools menu, click References.
- In the list of Available References, click to select any valid reference's check box, and click OK.
- On the File menu click Save.
- On the File menu click "Close and Return to Microsoft Word."
- In Word, click Close on the File menu to close the template.
- Repeat steps 1-5.
- Click to clear the check box for the reference you added in step 6, and click OK.
- On the Debug menu, click Compile <your template project name>.
- On the File menu, click Save.
If the error continues to occur after performing these steps, quit all Microsoft Office programs that are running. Then, uninstall and reinstall Microsoft Office.
For additional information, please see the following article in the Microsoft Knowledge Base:
158658 How to Completely Remove Microsoft Office 97
Additional query words: can t
Keywords: kberrmsg kbprb kbprogramming kbvirus KB184981