Win 2000 MS Word 2003 macro won't compile, error VB

B

BLeman

When trying to compile and run a macro with Word 2003, the VB compiler
returns an erro. The macro code is correct as it will run on other machines.
It appears that the VB library or system is corrupt. How do I fix this?
Macros will compile and run in Excel on the same computer.
 
B

BLeman

The Error that is displayed is from Microsoft Visual Basic and is "Compile
Error: Expected: line number or label statement or end of statement". The
actual line it stopped on is the first line: Sub BRL (). The whole macro is
just a test case and is as follows:
Sub BRL()
'
' BRL Macro
' Macro recorded 11/4/2006 by
'
ChangeFileOpenDirectory "C:\RezOvation\"
Documents.Open FileName:="Invoice.rtf", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
ActiveDocument.Close
End Sub

Thanks

BLeman
 
B

BLeman

The data that is actually displayed when the compile stops is garbage (misc
characters)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top