I have this question for a long time...
I am working in MS Access and I have made two buttons in my form.
One button generates a merge document and save it in a specific folder on my computer.
Second button, converts this word document into pdf document by printing it through "pdf995".
But whenever i click on this button a extra word document (document1) opens.
If i manually opens this word document and print it through pdf995, then it works fine.
The extra word document is only generated when i automatically (through code of button) try to convert it to pdf document.
The code I am using to convert this merge document into odf is as follows::::::
Set appWord = GetObject(, "Word.Application")
strDefaultPrinter = appWord.ActivePrinter
appWord.ActivePrinter = "PDF995"
strWordDoc = Me.DocPath
Set doc = appWord.Documents.Add(strWordDoc)
appWord.ActivePrinter = strDefaultPrinter
DocPath is a name of field on my MS ACcess form, which contains the path of a merged(word) document which is to be converted to pdf.
Is the way to call pdf995 wrong???
Can anybody plz provide me with a code to convert this word document into pdf???
Thanx a lot!!!