package require tcom
set application [::tcom::ref createobject "Word.Application"]
set documents [$application Documents]
set document [$documents Open test1.doc]
set docApp [$document Application]
$docApp Run Macro1
$application Quit
When I do the $docApp Run Macro1, I get the error: "Error: 0x80020003
{Unable to run the specified macro}".
Is this a tcl syntax error or an error within Word?
Thanks in advance,
Kathy R
The error is from Word. You may have to correctly path the macro with
the project and module containing the macro. For example,
$docApp Run Project.MyModule.Macro1
Thanks for the reply. The macro I was trying to run resides in a
template document. I found I needed to open this template as well as
the document I wanted to run the macro against.