C
Cindy
I have an Access form that outputs a query to be used as a
merge data source. The Word merge doc contains a macro
called QuoteMerge. Anyone know why the following code
line returns the error "unable to run specified macro".
The actual merge document does open but the macro will not
run. If I manually run the macro in Word, it works.
'this first line of code runs fine
Set wordDoc = wordApp.Documents.Open(TEMPLATE_PATH &
SelectDoc & ".doc")
'this line of code is to invoke the macro - this is where
the error "unable to run specified macro"
wordApp.Run ("'" & TEMPLATE_PATH & SelectDoc & ".doc'!
NewMacros.QuoteMerge")
TEMPLATE_PATH = the path location
SelectDoc = the document to merge selected by the user on
the form.
Thanks.
Cindy
merge data source. The Word merge doc contains a macro
called QuoteMerge. Anyone know why the following code
line returns the error "unable to run specified macro".
The actual merge document does open but the macro will not
run. If I manually run the macro in Word, it works.
'this first line of code runs fine
Set wordDoc = wordApp.Documents.Open(TEMPLATE_PATH &
SelectDoc & ".doc")
'this line of code is to invoke the macro - this is where
the error "unable to run specified macro"
wordApp.Run ("'" & TEMPLATE_PATH & SelectDoc & ".doc'!
NewMacros.QuoteMerge")
TEMPLATE_PATH = the path location
SelectDoc = the document to merge selected by the user on
the form.
Thanks.
Cindy