Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem running pdf995

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
GB
I have some code that print to a pdf using pdf955 and then adds the pdf to our document imaging system. It looks like this, lots of detail missing but this shows the flow.

Code:
 'set up pdf995 ini
 
 When pdf995 is finished, it runs deleteme.bat which deletes deleteme.del
   
 On Local Error Resume Next
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objFile = objFSO.CreateTextFile("c:\overdrive\deleteme.del")
 On Local Error GoTo 0

 ActiveDocument.SaveAs cDocumentName
 
 STDprinter = Application.ActivePrinter
 Application.ActivePrinter = "pdf995"
 ActiveDocument.PrintOut
 Application.ActivePrinter = STDprinter
 cDocumentName = cPath & Jcounter & ".pdf"

 loop to check when c:\overdrive\deleteme.del is deleted

 Run document imaging input

 'reset pdf995 ini

The palaver with deleteme.del and deleteme.bat is supposed to make the process wait until the pdf has been generated.

The problem is that the word code is whistling straight through right to the end and then creating the pdf.

Does anyone know how I could persuade the print to pdf section to print where I have told it to and not at the end.

I haven't explained this terribly well, I hope it makes some sense to someone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top