Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Printer Options jujuwillis Excel Discussion (Misc queries) 1 August 28th 06 03:21 AM
printer options kari Excel Programming 2 November 4th 04 03:09 PM
Setting Printer Nathan[_4_] Excel Programming 4 June 23rd 04 05:36 PM
Setting printer paper smi Excel Programming 3 October 19th 03 08:59 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"