Could the word document be locked by another process?
Can you try a different doc?
>>> [EMAIL PROTECTED] 4/04/2006 4:41 pm >>>
Hi,
Has anybody had a go at using Acrobat as a COM object to convert MS Word files
to pdf?
I've been through a variety of tools with varying degrees of success. All seem
to have something 'not quite right' so now I'm looking at Acrobat...
I've managed to get it to convert .txt, .gif, .jpg and even to read and
recreate .pdf files (without even trying really) but it just wont open .doc
files. There are lots of vbs examples out there that I followed to create the
following code...
<cfscript>
sInputPath = "c:\temp\test.doc">
oAcroExchApp = CreateObject("COM", "AcroExch.App");
oAcroExchApp.CloseAllDocs();
oAVdoc = CreateObject("COM", "AcroExch.AVDoc");
// Open the word document to be converted to PDF
openresult = oAVdoc.Open(sInputPath, '');
</cfscript>
<cfoutput>
openresult: #openresult#
</cfoutput>
When ever I run this for a MS Word file I get: "openresult: NO". When I run it
for one of the other file types mentioned I get "openresult: YES".
If the file doesn't exist then the oAVdoc.Open() call hangs
I've even changed the cfserver service so that it is now running as
administrator...
Yes, MS Word is installed and I can even open a MS Word file in Acrobat and it
will do the conversion for me (via the Word App) then display the pdf version.
Any hints or tips at this point would be very welcome!
Many thanks,
Brett
B)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---