--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
-----Original Message-----
From: Josh Remus [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 7:29 AM
To: CF-Talk
Subject: COM & Word
I'm attempting to print from Word via COM, and am getting error messages
that tell me that there are no printers installed (which there are of
course). The puzzling thing is this: While attempting to narrow down the
problem, I simplified the code like so:
<!--- Try to connect to the Word application object --->
<CFTRY>
<!--- If it exists, connect to it --->
<CFOBJECT
ACTION=""> CLASS="Word.Application"
NAME="objWord"
TYPE="COM">
<CFCATCH>
<!--- The object doesn't exist, so create it --->
<CFOBJECT
ACTION=""> CLASS="Word.Application"
NAME="objWord"
TYPE="COM">
</CFCATCH>
</CFTRY>
<!--- <cftry> --->
<CFSCRIPT>
/* This will open Word if running locally */
objWord.Visible = true;
/* This returns the 'Documents' collection of the Word object */
objDoc = objWord.Documents;
/* Open the document */
newDoc = objDoc.open(fileName);
/* Send the document to the server's default printer */
// newDoc.PrintOut();
/* Close the document */
newDoc.Close();
/* Quit Word */
objWord.Quit();
</CFSCRIPT>
However Word never even becomes visible on the server. But it'snot throwing
any errors now that I've commented out the PrintOut() function.
Any ideas/suggestions? Thanks!
---
Josh Remus
Network Manager
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

