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" ?
I think there is a simpler solution for your problem. Just use the PDF24-docTool.exe to convert your files to PDF. Use the following command line:
pdf24-DocTool.exe -convertToPDF [-profile profileId] -outputFile OUT FILE1 [FILE2]
This lets you specify the input file and the output file.
When you call the docTool without arguments on the command line, then the tool outputs all command line arguments.