Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a .doc in the background

Status
Not open for further replies.

txjump

Programmer
May 17, 2002
76
US
Hi everyone,

we are trying to print a .doc file using ShellExecute. is there anyway to have this file print in the background without having the whole word application pop up then open, print and close the document, then close the app?

is there some other function or setting that will allow me to just print it in the background?

any suggestions will be greatly appreciated! :)

thanks
[ponytails2]
 
You may be able to do it using the CCommandLineInfo class but I'm not sure coz I never tried it with other applications.
You existing app most likely uses CCommandLineInfo in it's init instance function to open a new doc on start up. However, you can use the class to print docs also provided you know the path. However, I'm not sure if it does it for another app without opening that app first.
 
thanks for the suggestion,

im actually looking for a system function that can be called by any language able to call dlls. any other ideas? other than trying a wrapper for ccommandlineinfo..

:)
txjump
[ponytails2]
 
I'm not quite sure I understand what you mean. Surely you are writing the DLL in one language and then that DDL is accessed by other languages. If that's the case then surely you need the DLL to make the actual calling to print a document - in other words, the DLL is simply relaying a message from some .exe (any language) to open the document, eg:

SomeProgram -> tells DLL which doc to print

DDL -> prints the document on behalf of SomeProgram
 
hehehehe...ive switched tracks on you...sorry.

i have a team member who is writing a powerbuilder app. he was asking if i knew of a windows api function that would work the way he wanted it to.

i can certainly write a dll to attempt that but he didnt ask for that. figured id look for an api function that would work before i offered to create a new dll. :)


sorry for the confusion.
txjump
[ponytails2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top