PC Review


Reply
Thread Tools Rate Thread

Automatically produce Multiple PDF files from a single chart

 
 
=?Utf-8?B?c3R1YXJ0IGJsb2Nr?=
Guest
Posts: n/a
 
      18th Oct 2007
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 With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBILg==?=
Guest
Posts: n/a
 
      19th Oct 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Produce Single Report Listing Multiple Queries? fastandbad Microsoft Access 0 19th May 2008 07:09 PM
Looping thru multiple files to produce a consolidated summary by Code u473 Microsoft Excel Programming 12 19th Sep 2007 06:19 PM
Looping thru multiple files to produce a consolidated summary by Cod u473 Microsoft Excel Programming 0 17th Sep 2007 06:20 PM
multiple single tiff files into a single multiple pages file.. genc ymeri Microsoft C# .NET 0 23rd May 2006 07:41 PM
Multiple Chart on Single Page BT Microsoft Excel Charting 4 10th Mar 2006 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:23 PM.