Hi! I'm an italian user who has a big problem ^_^".. I succseed in passing jobs to PDFCreator from Access2003-> Word2003, but then the jobs arrives in the PDFCreator Queue and it doesn't do anything!
I set the autosave and other things.. The idea is to convert a .doc file to a .pdf file.. This is the code i wrote:
Public Sub Initialize(filename As String, directory As String)
'I create the object
Dim pdfCreator As pdfCreator.clsPDFCreator
Set pdfCreator = New pdfCreator.clsPDFCreator
'I save the options
Dim options As pdfCreator.clsPDFCreatorOptions
Set options = pdfCreator.cOptions
With pdfCreator
'Starting PDFCreator
If .cStart("/NoProcessingAtStartup", True) = False Then
Exit Sub
End If
'Setting the autosave
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = directory
.cOption("AutosaveFilename") = filename + ".pdf"
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cOption("AutosaveStartStandardProgram") = 0
.cOption("SaveFilename") = filename
'I clear the queue
.cClearCache
'I stop the printer to wait for the document
.cPrinterStop = True
End With
Dim objWord As Word.Application
Set objWord = New Word.Application
'I open the Word File
Dim filedaaprire As String
filedaaprire = directory + filename
objWord.Documents.Add filedaaprire
'Saving the default printer
Dim stampantePredefinitaTemp As String
stampantePredefinitaTemp = objWord.ActivePrinter
'I set the PDFCreator printer
objWord.ActivePrinter = "PDFCreator"
objWord.PrintOut
var = pdfCreator.cStart("", True)
'Reset the old settings
pdfCreator.cSaveOptions options
'Reset the old printer
objWord.ActivePrinter = stampantePredefinitaTemp
'Close the app
objWord.ActiveDocument.Close
objWord.Application.Quit
Set objWord = Nothing
End Sub
THANKS TO ALL ^^