Hi!
can any one help me by providing the method when i open any text file and convert into pdf format. I searched on the net and i got some code but i am not understanding this code and it also produce error on the highlited line. for converting the file can i have to do the refrence to adobe liberary please tell me
Dim wrd As New Word.Application
Dim doc As Word.Document
wrd.Visible = False
wrd.ScreenUpdating = False
wrd.ActivePrinter = "Acrobat Distiller"
'Open the document
Set doc = wrd.Documents.Open("d:\abc\test.doc")
'Print it to a PostScript file using Distiller
doc.PrintOut False, False, , "d:\abc\test.ps", , , , , , , True
doc.Close False
wrd.Quit False
Set doc = Nothing
Set wrd = Nothing
'Now call distiller to convert the postscript file to PDF
Dim acr As New ACRODISTXLib.PdfDistiller//user defined type not defined
acr.bShowWindow = False
acr.FileToPDF "d:\abc\test.ps", "d:\abc\test.pdf", True
'acr.FileToPDF "d:\abc\test.ps", "d:\abc\test.pdf", 1
Set acr = Nothing
'Delete the old PS file
Kill "d:\abc\test.ps"
'Done
Exit Sub
PDF_error:
doc.Close False
wrd.Quit False
Set doc = Nothing
Set wrd = Nothing
Set acr = Nothing