Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Printer Options Programmatically
Excel 2003. I am trying to create PDF files from each of the sheets in my
workbook. I am using the code: Sub test() Dim a As Integer Dim wb As Workbook Application.ScreenUpdating = False For a = 1 To ThisWorkbook.Worksheets.Count ThisWorkbook.Sheets(a).Copy Set wb = ActiveWorkbook wb.PrintOut , , , , "Adobe PDF" wb.Close False Set wb = Nothing Next a Application.ScreenUpdating = True End Sub This works fine the first time I "print" to a PDF file, since I set the printer not to prompt for file name, etc. However, when I move to the next sheet the printer options have been reset. How may I set the options for the printer programmatically before each .PrintOut? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printer Multiple Worksheets with a particular Printer Setting | Excel Worksheet Functions | |||
Printer Options | Excel Discussion (Misc queries) | |||
printer options | Excel Programming | |||
Setting Printer | Excel Programming | |||
Setting printer paper | Excel Programming |