When running the following Visual Basic file, which opens a Word document and runs a macro, I get an error 800A01A8 on Line 5 (see below), Object required: 'documents.Open(...)', even though this VBS file has worked for about 8 years now. Since the file name was not changed or moved, guessing that VBS has been updated, but can't find what the correct object command is. Any ideas?
Line 5 seems to be (see also below): Set wdWb = wdApp.documents.Open("R:\fmExports\MastersandMacros\UPCSetupStarter")
Dim wdApp, wdWb
Set wdApp = CreateObject("Word.Application")
wdApp.Visible = True
Set wdWb = wdApp.documents.Open("R:\fmExports\MastersandMacros\UPCSetupStarter")
'if the macro takes arguments, use:
'wdApp.Run "FormatUPCSales", "Arg1", "Arg2", "Arg3"
Set wdWb = Nothing
Set wdApp = Nothing