#1
|
|||
|
|||
Word to prn
Hello all,
I need to convert Doc(word) file to Prn file through VBA or through any programming language. Could you please advise me how to convert doc to prn(or)ps without manual interaction. Thanks for looking into this. |
#2
|
|||
|
|||
Anyone please!
|
#3
|
|||
|
|||
Hi,
You can access the prn option in office 2003/2007 through: File, Print, and clicking the Print to File box. Kind regards Paul |
#4
|
|||
|
|||
Thanks for your response. But i need to automate this conversion without manual interaction. Could you please provide any sample code for this conversion.
|
#5
|
|||
|
|||
Anyone please help me.
|
#6
|
|||
|
|||
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 |
#7
|
||||
|
||||
You don't need a third party tool. The code to save the current document into the same directory could be as simple as this
Sub temp1() Dim sFileName As String sFileName = ActiveDocument.FullName ActiveDocument.PrintOut Background:=False, PrintToFile:=True, OutputFileName:=sFileName & ".ps" End Sub |
#8
|
|||
|
|||
Thanks for your help.
|
Thread Tools | |
Display Modes | |
|