Creating a PDF from code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is is possible to open a Word file and save it to a PDF file from within the
code?

I use the following code to open the word file and save it:
Dim objWord As Word.Application
Set objWord = GetObject("", "word.application")
objWord.Visible = False
objWord.Documents.Open sOpenLoc & sOpenFile
objWord.ActiveDocument.SaveAs sDestLoc & sFile
objWord.Quit

Can I do something like this and save it to a PDF?
 
MS does not have a save as PDF option. You need to install a virtual pdf
printer on your pc (PDF Creator, CutePDF Writer,...) and then print the doc
to that printer. Also, for report from an access db you can also use Lebans
ReportToPDF (http://www.lebans.com/reporttopdf.htm).
 
Back
Top