unknown
2006-09-09 16:30:09 UTC
Windows XP SP2, Word 2000.
I've been trying to convert Word docs to PDF automatically, and
unattended. I wrote macros to manage the docs and invoke the Adobe
Acrobat 6.0 PDF-conversion feature. The Public entrypoint to my
macros is called "MergeToPDF".
I'm using a perl script similar to the one on this page:
http://www.windowsdevcenter.com/pub/a/windows/2005/03/22/word_macros.html?CMP=ILC-KT7751768473&ATT=1364
The perl script invokes my macro "MergeToPDF" after starting Word and
Opening the doc.
I have a .bat file that invokes the perl script.
When I run the .bat from the command line, everything works just fine.
When I run the .bat as an "at" job, it's as if the macros aren't
loaded. I get these messages:
OLE exception from "Microsoft Word":
Unable to run the specified macro
Win32::OLE(0.1704) error 0x80020003: "Member not found"
in METHOD/PROPERTYGET "Run" at c:\autopdf.pl line 45
I keep the macro in its own .dot file in ...\Word\STARTUP, but this
behavior also happens when I move the macro code to Normal.dot.
It's as if Normal.dot and the add-ins aren't loaded when Word is run
in the "background".
Can this be made to work?
-Christopher Allen
christopher.allen at workscape dot NOSPAM dot com
I've been trying to convert Word docs to PDF automatically, and
unattended. I wrote macros to manage the docs and invoke the Adobe
Acrobat 6.0 PDF-conversion feature. The Public entrypoint to my
macros is called "MergeToPDF".
I'm using a perl script similar to the one on this page:
http://www.windowsdevcenter.com/pub/a/windows/2005/03/22/word_macros.html?CMP=ILC-KT7751768473&ATT=1364
The perl script invokes my macro "MergeToPDF" after starting Word and
Opening the doc.
I have a .bat file that invokes the perl script.
When I run the .bat from the command line, everything works just fine.
When I run the .bat as an "at" job, it's as if the macros aren't
loaded. I get these messages:
OLE exception from "Microsoft Word":
Unable to run the specified macro
Win32::OLE(0.1704) error 0x80020003: "Member not found"
in METHOD/PROPERTYGET "Run" at c:\autopdf.pl line 45
I keep the macro in its own .dot file in ...\Word\STARTUP, but this
behavior also happens when I move the macro code to Normal.dot.
It's as if Normal.dot and the add-ins aren't loaded when Word is run
in the "background".
Can this be made to work?
-Christopher Allen
christopher.allen at workscape dot NOSPAM dot com