Print to File...

garden_rael

Board Regular
Joined
Apr 1, 2008
Messages
100
Is there a way to make a macro to print to PDF or to a file and give an specific name to the file to be printed?
Can a Macro Change the name of the sheet? and then print a file with that name?

Thank you!!!
<!-- / message -->
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
The answer to both questions would be yes but would need some more detail. How you would go about it depends on the software you are using to create the pdf file. Are you using Adobe Pro?

Dom
 
Upvote 0
It's Adobe Acrobat 7.0 Standard
I try to open it using the createobject command, but didn't work.. couldn't find the regisitry name to call it...

Now... even if I didn't have PDF... you can always print to a file can you?
I tried it... and It looks like a web page or something like that...


Any ideas?
 
Upvote 0
I tried it, but I get an error on


Dim mypdfDist As New PDFDistiller


mypdfDist.FileToPDF tempPSFileName, tempPDFFileName, ""

What could it be?
 
Upvote 0
Did you install the Distiller VBA Library?

Code:
'Dom Hill, June 2008
'This code has only been tested with Adobe Acrobat 6.0 Professional
'For this code to work the Adobe Distiller VBA library must be enabled
'Select Tools...References in the VBA editor and check it from the list

I've not used Acrobat 7.0 Standard but assume it comes the same.

Dom
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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