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
"Shauna Kelly" wrote:
Hi BLeman
What error message is displayed? And what is the line of code displayed when
the compiler stops?
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
"BLeman" wrote in message
news
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.