Excel convert to pdf file in macro

mond

New Member
Joined
Mar 29, 2009
Messages
20
Hello everyone
Please help, Is there any chance that a certain excel file can be automatically convert it to printable .pdf file then save it to a folder, say c:/document then replace the old file in macro code, by pressing a command button “convert and save”
Thanks:confused:
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I don't know what macro should be used but I suggest you should try the following ...

1. Download cutepdf software. Install it. go to printer settings and choose cutepdf as default printer.

2. Record a macro Tools>Macro>Record new macro (Short cut say ctrl+shift+p). Set print area from each sheet (The way you want to print them). Highlight all the sheet and then print. This will ask you to save as pdf. STOP the macro recorder. Then use the same shortcut (ctrl+shift+p) everytime you want to print.

HDH ...
 
Upvote 0
The other thread was posted just two minutes apart. I suspect that it was an accidental "double-click". Since this one has replies, I have deleted the other one.

If there seems to be a delay when you submit a post, please do not hit Submit again. Usually, that will lead to double-posting.
 
Upvote 0
/thank Search
I'm after a similar thing.

I recorded the macro;
Code:
Sub Save()
    
    Application.ActivePrinter = "CutePDF Writer on CPW2:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
        "CutePDF Writer on CPW2:", Collate:=True
End Sub
But how do I specify a file path? (G:\[folder]\[folder]\)
I would also like the file name to be YYMMDDhhmm.pdf
Also, would it be possible to paste the "YYMMDDhhmm" value into cell I9? :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,490
Members
448,967
Latest member
visheshkotha

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