Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save as .pdf
I need to save an active sheet as a pdf with a specified file name. I
have read various postings in this group and written a small macro to send the active area of my sheet to pdf printer and all that works fine. How do I specifiy what I want the resulting pdf file to be called (by default it saves it as the same names as the the source file). Please go easy on me, I am not a VB expert and not particularly technical! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save as .pdf
Hi,
Once your first job done, use the "Name" function Extract form VBA help Dim OldName, NewName OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names. Name OldName As NewName ' Rename file. OldName = "C:\MYDIR\OLDFILE": NewName = "C:\YOURDIR\NEWFILE" Name OldName As NewName ' Move and rename file. RegardsJean-Yves"spanner" wrote in message oups.com... I need to save an active sheet as a pdf with a specified file name. I have read various postings in this group and written a small macro to send the active area of my sheet to pdf printer and all that works fine. How do I specifiy what I want the resulting pdf file to be called (by default it saves it as the same names as the the source file). Please go easy on me, I am not a VB expert and not particularly technical! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) |