View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default Specifying Filename when creating PDf from Excel Workbook

jlejehan-

in case you are still monitoring this thread for responses; it sounds like
you are simply using the Excel "save as" function and adding .pdf on the end
of the filename. This won't work, because your pdf creation software (adobe
or cutepdf) actually has to make a new file based on what is being sent to
the printer driver by Excel. If you'd like a simple (but inelegant)
solution, print the document and let it save the file with your current
filename. Then in VBA code, pause for 5-10 seconds to give the pdf filemaker
time to finish making the file, then use VBA to simply rename that file to
your desired name using the name from your worksheet. You can also move the
file with the same code, if cutepdf is dumping the .pdf file in a directory
other than where you want the file. I had code that did this with Adobe
Acrobat 4 (or was it 5?) but I don't have access to that code anymore, so
you'll have to check the Excel helpfile, try to come up with some sample
code, then post back again if you need more help.

best of luck,
Keith

"jlejehan" wrote in
message ...

William,

Thanks - sadly I don't have access to the pdfdistiller, so I'm having
to use cutepdf instead and try and find code that works on this.

I hope I'm almost there but the file created just doesn't open in
acrobat reader - it's not recognised.

I assume the reason for using the distiller in the first place is to
rectify the problems associated with moving straight from traditional
excel format to a pdf, so there may be someway of doing this using the
cutepdf printer - but I still can't figure this out personally.

if anyone has any further suggestions I'd be grateful?

thanks


--
jlejehan
------------------------------------------------------------------------
jlejehan's Profile:

http://www.excelforum.com/member.php...o&userid=33950
View this thread: http://www.excelforum.com/showthread...hreadid=547403