Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically produce Multiple PDF files from a single chart
Hi,
I have a single chart in excel which is indexed to a table so that I can select via a combo box which range of data I require to chart. Currently I can print out every variation of the chart via a simple macro, by looping to change the index row value. My question is, I need to produce these charts in PDF format. But when I print to Acrobat Writer is uses the excel filename as the PDF filename, how can use the index value as the PDF Filename. Thus allowing me to add this code to my existing macro to allow me to print every variation of the chart to a single directory without having to rename the pdf files as they are printed. By the way I have 660 different index values / charts to produce on a weekly basis. Thanks Stuart |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically produce Multiple PDF files from a single chart
After each file is created by printing it, add code like this:
'Thepath is where the path to copy the file to. 'ToFile is the name of the spreadsheet 'ext would be .pdf 'Fname would be the name the pdf program creates the file 'the kill statement removes the old file name before you print the next one in case adobe makes you reply yes to overwrite it. Dim Fname as string Dim ThePath as String Dim ToFile as String Dim Ext as String 'place this in a loop of 660 to go through all your scenarios. 'set the chart 'print the file..... then: FileCopy FName, ThePath & Trim(ToFile) & Ext Kill FName 'then loop back through "stuart block" wrote: Hi, I have a single chart in excel which is indexed to a table so that I can select via a combo box which range of data I require to chart. Currently I can print out every variation of the chart via a simple macro, by looping to change the index row value. My question is, I need to produce these charts in PDF format. But when I print to Acrobat Writer is uses the excel filename as the PDF filename, how can use the index value as the PDF Filename. Thus allowing me to add this code to my existing macro to allow me to print every variation of the chart to a single directory without having to rename the pdf files as they are printed. By the way I have 660 different index values / charts to produce on a weekly basis. Thanks Stuart |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Collating multiple .csv files into a single work book | Excel Discussion (Misc queries) | |||
Looping thru multiple files to produce a consolidated summary by Code | Excel Programming | |||
Looping thru multiple files to produce a consolidated summary by Cod | Excel Programming | |||
Can I import many .txt files in a single worksheet automatically? | Excel Discussion (Misc queries) | |||
Can I import many .txt files in a single worksheet automatically? | Excel Worksheet Functions |