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

How to print a document from VB^

Status
Not open for further replies.
Aug 13, 2002
14
US
Open ("JD.doc") For Append As #1
Write #1, strJobDescription
txtJobDescription = strJobDescription
Close #1

The above is a document I use in my project..I know how to print a form in VB6 (PrintForm)...but I can't figure out how to simply print a document that I use in an application.
Do I have to use a CommonDialog box or is there a more simple way? If I have to use a CommonDialog box, what code do I have to write to make it print the above document.
Thank you so much.
Glenn
 
Is it just a text file?
You could the RichTextBox control for that and use its SelPrint method.
 
It is actually a word document. I was previously using a text document but I learned that there are problems with formating a text file so I changed it to a word document....I'm just not sure how to print the word document from within the VB6 environment.
Thank you
Glenn
 

You could use the shell function, ShellExecute API, ShellExecuteEx API, or create a reference to the word object and use that to print.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top