Thread: [Solved] Word to prn
View Single Post
 
Old 03-22-2010, 02:53 AM
mariaprabudass mariaprabudass is offline Windows XP Office 2003
Novice
 
Join Date: Jan 2010
Posts: 12
mariaprabudass is on a distinguished road
Default

I copied the code for doc to prn thriugh visual basic. If i run the code the dialog window opening for saving the .prn file. Could you please advise me how to control that dialog window(save as) via code. (Or) Is there any third party tool available for this.

Code:
Dim WordObj As Word.Application
Dim Doc As Word.Document
Set WordObj = New Word.Application
WordObj.DisplayAlerts = 0
Set Doc = WordObj.Documents.Open("C:\1.doc")
WordObj.PrintOut Background:=False
Doc.Saved = True
WordObj.Quit
Set WordObj = Nothing

Thanks in advance
Reply With Quote