Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Win 2000 MS Word 2003 macro won't compile, error VB
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. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Win 2000 MS Word 2003 macro won't compile, error VB
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. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Win 2000 MS Word 2003 macro won't compile, error VB
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. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Win 2000 MS Word 2003 macro won't compile, error VB
The data that is actually displayed when the compile stops is garbage (misc
characters) "BLeman" wrote: 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 97 in Windows XP to maintain formatting | Microsoft Word Help | |||
Converting WordPerfect 12 files to Word 2003 | New Users | |||
How do I create Word macro that will run properly using copy/past. | Microsoft Word Help | |||
Word 2003 Mailmerge problem - works in Word 2000 | Mailmerge | |||
Macros - Keyboard Commands | Microsoft Word Help |