how to Automatically save a file as PDF (A Docx, for example)

TassadarExcel

New Member
Joined
Nov 22, 2017
Messages
12
Hi all,

This is my first message on this community, I'm glad for having register.

I'm trying to add a functionality to a program I've developed using Excel and VBA. I want to be able to open a PDF file and print as PDF in another file, all this automatically.

Now you wonder "Why opening a PDF and save it as PDF?". It is becouse I have PDF files that doesn't work properly on old readers and I solve it by opening them and printing as PDF using CutePDF.

I've read many threads explaining how to save as PDF an spreadsheet but I've no clear how to do this that I need.

Any Help?

Regards
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
So why not open the PDFs using Word, then use Save As to create the new copies of them?
 
Upvote 0
If I try to open those PDFs using Word a get a message saying something like "This PDF contains interactive features that are not compatible with the PDF distribution. Word will not show this content".

I'm afraid the only solution is opening with adobe reader and print as PDF with cutePDF or another PDF converter.

Many thanks
 
Upvote 0
You might be able to suppress that warning via:
Application.DisplayAlerts = wdAlertsNone
resetting it afterwards to:
Application.DisplayAlerts = wdAlertsAll
The only issue you then need to resolve is whether any content compatible with the earlier readers you're trying to work with is lost.
 
Upvote 0
By opening those files directly with Word (right click, open with Word), if I ignore this message I lose lot of content of the file, so I suppose that calling Word from an Excel macro would give me the same result.

Of couse, as I told, opening those files with Adobe and printing in PDF with CutePDF creates a versión that Works on old Adobe reader versions. Perhaps it could be posible using another PDF writer from CutePDF.

There is a lot of info over the internet explaining how to print as PDF an Excel sheet, the problema is I have to do it with a PDF, hehe.

Regards and thanks again.
 
Upvote 0
I've also found information about take a PDF and automatically print (on a physical printer), I suppose it could work with a PDF printer, but then it surely ask me for every filename to use, and I want to set those filenames via code and do all without user interaction.

Regards
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top