Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing to PDF Goes to Wrong Drive/Folder
I wrote a simple macro to print the active sheet to the
PDF printer. I want to always print to the same folder on my G drive, however, if my last manual file operation such as a file saveas or file open was browsed to another drive then the PDF file always goes to that drive. I use a statement chdrive "g:" in my macro, but it seems that this is ignored and it goes back to the last drive manually accessed without any error. It seems like my chdrive statement is not affecting the overall system default drive or something. Is there a workaround. TIA Dim MyActivePrinter As String MyActivePrinter = application.activeprinter 'save current default printer name ChDrive ("g:")' added this to make sure g drive is selected ChDir "g:\pdf" 'point to the right folder Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" ActiveWindow.SelectedSheets.PrintOut Copies:=1 Application.ActivePrinter = MyActivePrinter ' reset the default printer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Links to Local Drive Instead of Same Folder | Excel Discussion (Misc queries) | |||
Folder Network drive | Excel Discussion (Misc queries) | |||
add a folder to c:\ drive from cell A1 contents... | Excel Discussion (Misc queries) | |||
How do I lock a folder on a shared drive ? | Excel Discussion (Misc queries) | |||
Pasting a range of information from a foler on F Drive to another folder on same drive | Excel Programming |