P
peter.mcclymont
Hi All,
I am trying to run a word macro from within a vb script that looks
like this,
Sub StartNewMacro()
'
' StartNewMacro Macro
'
Set app = CreateObject("Word.Application")
Set doc = app.Documents.Open("C:\\MOM\\Test.doc", False, True,
False, , , True, , , wdOpenFormatAuto, , True)
Set returnValue = AddIns.Add("C:\\MOM\\WebPublisher.dot", True)
app.Run ("ConvertHTML")
app.Run ("ConvertHTMLBatch")
End Sub
So basically I have a document called test.doc which I want to apply
the macro to, and the macro is in the WebPublisher.dot file. The
test.doc file will eventually become any file, and can be different
every time hence the reason they are both in a separate document.
Now though when the execution gets to the app.Run command I get the
error message,
Run-time error '-2147352573 (800020003)':
Unable to run the specified macro
Any ideas?
I am trying to run a word macro from within a vb script that looks
like this,
Sub StartNewMacro()
'
' StartNewMacro Macro
'
Set app = CreateObject("Word.Application")
Set doc = app.Documents.Open("C:\\MOM\\Test.doc", False, True,
False, , , True, , , wdOpenFormatAuto, , True)
Set returnValue = AddIns.Add("C:\\MOM\\WebPublisher.dot", True)
app.Run ("ConvertHTML")
app.Run ("ConvertHTMLBatch")
End Sub
So basically I have a document called test.doc which I want to apply
the macro to, and the macro is in the WebPublisher.dot file. The
test.doc file will eventually become any file, and can be different
every time hence the reason they are both in a separate document.
Now though when the execution gets to the app.Run command I get the
error message,
Run-time error '-2147352573 (800020003)':
Unable to run the specified macro
Any ideas?