Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm looking for a way to print a Excel sheet into a PDF formatted file. the used PDF printer is "PDF-XChange 3.0" Due to company policy, i don't know for sure if i can use other software than the one already installed. I use now following code: Sub CopyToNewSheet() ' Sheets("Foutdetectie").Select Sheets("Foutdetectie").Copy After:=Sheets(2) Sheets("Foutdetectie (2)").Select Range("A1").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "PDF-XChange 3.0 on Ne00:", printtofile:=True, prtofilename:=FileName Application.DisplayAlerts = False Sheets("Foutdetectie (2)").Select ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True Sheets("Foutdetectie").Select Range("A1").Select End Sub the problems (2) i encounter are as follow: When i invoke the following code, ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "PDF-XChange 3.0 on Ne00:", printtofile:=True, prtofilename:=FileName a "Save As" form appears, and i have to enter the filename manually. I would like to have it all done by the macro. FileName is a variable getting its info from a function witch work. There's also a checkbox " Run Viewer Application After Saving' active, witch i need to checked out. When i delete the copy of the orriginal sheet, i get an error message : "Can't enter break mode at this time" Anyone who can help me with this? Regards, ludo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print and Print Preview Graphic Moving Resizing 2007/2003 | Excel Discussion (Misc queries) | |||
Macro to hide rows with a certain cell empty then set print area and print | Excel Programming | |||
cell borders that I create dont show on print preview or print | Excel Discussion (Misc queries) | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook | Excel Programming |