Hello,
does anyone have a solution to print directly a new generated report (from Data Export) in a pdf file with a ".bat", powershell, or something else?
It's for a CFR 21 part 11 project.
Thank you
Manu
You can use PDFCreator Free to do that, it is available on pdfforge. Edouard has made some video few years ago:
https://staging.pcvue.com//community/general/printing-to-pdf-file-with-pdfcreator/#post-930
Hi,
I think the subject is more: How to print automatically an exported file that has been generated?
Nico
Exactly Nico,
I am checking Pdf Architect, but I can't find some parameters that check new file in a folder to convert it in a pdf file. 🙁
Some new ideas?
Manu
OK, I did it years ago and the best way I found was to trigger an event when the Export is completed (using the status variable).
The VBA script opens the Excel file and print it.
Nico
Hi Nico
ive same requirement right now to print data export in pdf. any more notes on this pls?
chinmayi
Hi Chinmayi,
My answer is not enough?
Actually I talked with Manuel about this requirement. My answer is OK but you must have Excel installed on the computer.
Actually, there are several solutions to this problem but all need Excel installed.
Nico
Hi Nico
ive tried this but haven't succeed. any workaround available for this? or may be my way is not correct?
please help.
Chinmayi.
Send me your project, I will check and let you know where is the issue.
nico
Hi Chinmayi,
How did it end?
Is it ok to print the exported file?
Edouard
yes Edouard !
working fine.
thank you
Chinmayi
HI everybody,
is it possible to share the entire answer like a procedure to succeed this please?
Thanks
Hello
I have managed to do it like this.
so here is the VB code which I am running. It will give output straight as to PDF. its reading the value from triggering status variable and preparing the PDF. I have one excel file with 3 sheets in it. by using this code its generating 3 different pdfs for each sheet with specific format of file name and generation time . (please update excel template as per need and copy that to data export template of project folder).
for adding references after browsing we can look for C:Program FilesMicrosoft OfficerootOffice16EXCEL.EXE.
I am adding some screenshots and also VBA code for reference.
Thanks you!
Chinmayi
In 1 word,
That's the solution I gave you orally Manu. But, in your case it didn't work because Excel is needed on the station where the VBA is running.
Nico


