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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming Document In Printer Spool

Status
Not open for further replies.

Leviathan07

Programmer
Jul 14, 2000
11
CA
Hello, I am using the Printer object in visual basic 6 and am currently trying to get the document to appear with a name rather than always showing up as Visual Basic Document in the window print spool. Is there any way to set that name in VB???
 
use the microsoft word object model and that will show up with the document name in the printer spool then.
 
here is a sample of code i think might work for you:

dim objectprint as object
Set objprint = objprintect <filename as string>,&quot;Word.application&quot;)
objprint.Activate
objprint.PrintOut Background:= False
objectprint.Close
Set objprint = Nothing




Randy
 
opps coorect this line:
Set objprint = objprintect <filename as string>,&quot;Word.application&quot;)

to:

Set objprint = getobject(<filename as string>,&quot;Word.application&quot;)


randy
 
Thanks for the attempt, however, I cannot use the Word version because that is dependant on WORD actually being installed and the system that my application will be running on will not have Word installed. Do you know of any other way in which I can name the Doc Name in the printer spool. Thanks

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top