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 -->
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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
 

garden_rael

Board Regular
Joined
Apr 1, 2008
Messages
100
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?
 

garden_rael

Board Regular
Joined
Apr 1, 2008
Messages
100

ADVERTISEMENT

I'll try it out right away =)

Thank you very much!
 

garden_rael

Board Regular
Joined
Apr 1, 2008
Messages
100
I tried it, but I get an error on


Dim mypdfDist As New PDFDistiller


mypdfDist.FileToPDF tempPSFileName, tempPDFFileName, ""

What could it be?
 

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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
 

Watch MrExcel Video

Forum statistics

Threads
1,108,974
Messages
5,525,990
Members
409,673
Latest member
Riseee

This Week's Hot Topics

Top