Printing Graphs in pfd

Capaez2

New Member
Joined
Oct 16, 2008
Messages
6
I have a Excel workbook to produce and print a lot of graphs (Excel 2003).

The workbook uses a Graph template and changing the data in the template allow to print all the graphs. This is done with a Macro.

When trying to print using the printer option "Adobe pdf" to produce graphs in pdf format a screen pront appears asking for a file name, this file name need to be inputted manually.

I wolud like to input the pdf file name automatically in the macro.

Is this possible?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi Capaez2, not directly since Adode is not part any office object models. But you can probably do it indirectly. My PDF printer usually auto fills in the name of the file with the Excel book name. Therefore, using vba you should be able to save your workbook to whatever file name you want the pdf to be in then kill the dupe file afterwards.

Hope this gives you some insight.
 
Upvote 0
Or you could investigate "sendkeys". I haven't worked with it myself yet, so I can't give you any tip on how to implement it, but I know it is a way of communicating from vba to non-office programs.
 
Upvote 0
Hi Capaez2, not directly since Adode is not part any office object models. But you can probably do it indirectly. My PDF printer usually auto fills in the name of the file with the Excel book name. Therefore, using vba you should be able to save your workbook to whatever file name you want the pdf to be in then kill the dupe file afterwards.

Hope this gives you some insight.


Thank you, I will try this
 
Upvote 0
Or you could investigate "sendkeys". I haven't worked with it myself yet, so I can't give you any tip on how to implement it, but I know it is a way of communicating from vba to non-office programs.


!This actually worked!
The command "sendkeys" is a somehow tricky to use. It has to be allocate above the printing instruction.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,897
Members
449,097
Latest member
dbomb1414

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