0

I have created 6 documents in Visual Basic 4 which I programmatically print to Pdf24 from within a loop.

I need to autosave each individual pdf with a DIFFERENT FILENAME to the same folder.

I need to define each filename from within VB using a variable.

This is what I have done so far:-

In THE pdf24 Assistant settings I have :-

  • Set PDF Printer Tool to "Automatically save documents after printed"   (Under PDF Printer Tool)
  • Set the Output Directory to C:\PDFs   (Under Auto Save)
  • Set the Filename entry to use the placeholders  %Y, %m, %d, %H, M%, S% $filename   (Under PDF Printer Tool)

ALL 4 documents are saved OK as PDF's but with the $fileName placeholder part of the filename being saved as "Microsoft Visual Basic" for all 4 PDF's  ie. :-

  • 1st. file saved as "2018-11-16 12-04-09 Microsoft Visual Basic.pdf"
  • 2nd. file saved as "2018-11-16 12-04-10 Microsoft Visual Basic.pdf"
  • 3rd. file saved as "2018-11-16 12-04-11 Microsoft Visual Basic.pdf"
  • 4th. file saved as "2018-11-16 12-04-11 Microsoft Visual Basic.pdf"

What I need to do is to autosave all 4 files using my own filenames and without Date, Month etc. etc.   I can't fathom how to do it using just the $fileName placeholder - unfortunately, using just this, each PDF is saved with the filename "Microsoft Visual Basic", which means that each previous file saved is overwritten by the next file saved.

Is it possible from within Visual Basic to use a variable to define a DIFFERENT filename for EACH INDIVIDUAL PDF as it is autosaved?

I would be extremely grateful for any help whatsoever.

PS.  Does the $fileName placeholder take the filename from the application name which generates the PDF's hence the filename "Microsoft Visual Basic" ?

Answered question

I have just realised that the top line should have read "I have created 6 documents in Visual Basic 6 which I programmatically print to Pdf24 from within a loop."

I had put Visual Basic 4 when I meant Visual Basic 6.

I'm hoping that's the reason I haven't had any suggestions so far. Hope someone can help. Many thanks.