I have a problem with the error "invalid index. Please check the index parameter" when I do:
Set pJob = PDFCreatorQueue.NextJob
All code:
Dim PDFCreatorQueue As Queue
Dim pJob As PrintJob
Set PDFCreatorQueue = CreateObject ("PDFCreator.JobQueue")
PDFCreatorQueue.Initialize
If Not PDFCreatorQueue.WaitForJob (1) Then
If PDFCreatorQueue.Count> 0 Then PDFCreatorQueue.MergeAllJobs
'MsgBox "The print job did not reach the queue within" & "10 seconds"
End If
'MsgBox PDFCreatorQueue.NextJob.PrintJobInfo
'PDFCreatorQueue.Clear
Set pJob = PDFCreatorQueue.NextJob
pJob.SetProfileByGuid ("DefaultGuid")
pJob.ConvertTo (FileName)
If (Not pJob.IsFinished Or Not pJob.IsSuccessful) Then
'MsgBox "Could not convert the file:" & fullPath
Else
'MsgBox "Job finished successfully"
End If
'MsgBox "Releasing the object"
PDFCreatorQueue.ReleaseCom
there is one and it's copied from the documentation so I don't know where to go wrong. Any suggestions ?