+ Reply to Thread
Results 1 to 3 of 3

Setting printing properties

  1. #1
    Carl
    Guest

    Setting printing properties

    I just purchased a new Laserjet 1320tn printer and would like to know if
    anyone knows how to access the printer properties thru VBA. I run various
    VBA macros when printing reports from several worksheets and would like to be
    able to turn duplex printing on and/or off as well as select which tray I'm
    pringing from.

    All I can find in the VBA help is the ActivePrinter which I use to select
    the printer I want to use and ActiveWindow.SelectedSheets.Printout to set
    some options (copies, collate, etc.).

    Any help would be greatly apprecitaed.

    Carl White

  2. #2
    Tom Ogilvy
    Guest

    Re: Setting printing properties

    VB provides a printer object, but VBA does not, so you are pretty much stuck
    with 3 options

    1) Sendkeys (simulate keystroking a choice in the print setup dialog)
    2) Create another instance of the printer with the proper settings in the
    windows control panel, and select that.
    3) Using the Window API to interact with the printer

    This article will give some insights into the 3rd method:
    http://msdn.microsoft.com/archive/en...softAccess.asp

    The article is about access, but the API portions of the article are the
    same.

    Here are some other related articles:
    http://support.microsoft.com/default...b;en-us;230743
    HOWTO: Set Duplex Printing for Word Automation

    http://support.microsoft.com/default...b;en-us;190218
    HOWTO: Retrieve Settings From a Printer Driver

    http://support.microsoft.com/default...b;en-us;180645
    FIX: Cannot Change Page Settings During Print Job

    http://support.microsoft.com/default...b;en-us;266767
    HOWTO: Set Which Printer Is the System Default Printer

    --
    Regards,
    Tom Ogilvy



    "Carl" <[email protected]> wrote in message
    news:[email protected]...
    >I just purchased a new Laserjet 1320tn printer and would like to know if
    > anyone knows how to access the printer properties thru VBA. I run various
    > VBA macros when printing reports from several worksheets and would like to
    > be
    > able to turn duplex printing on and/or off as well as select which tray
    > I'm
    > pringing from.
    >
    > All I can find in the VBA help is the ActivePrinter which I use to select
    > the printer I want to use and ActiveWindow.SelectedSheets.Printout to set
    > some options (copies, collate, etc.).
    >
    > Any help would be greatly apprecitaed.
    >
    > Carl White




  3. #3
    Carl
    Guest

    Re: Setting printing properties

    Tom -

    Thanks for the links to the articles. I'll read through them and pull out
    what I can use. Thanks for the help.

    Carl White

    "Tom Ogilvy" wrote:

    > VB provides a printer object, but VBA does not, so you are pretty much stuck
    > with 3 options
    >
    > 1) Sendkeys (simulate keystroking a choice in the print setup dialog)
    > 2) Create another instance of the printer with the proper settings in the
    > windows control panel, and select that.
    > 3) Using the Window API to interact with the printer
    >
    > This article will give some insights into the 3rd method:
    > http://msdn.microsoft.com/archive/en...softAccess.asp
    >
    > The article is about access, but the API portions of the article are the
    > same.
    >
    > Here are some other related articles:
    > http://support.microsoft.com/default...b;en-us;230743
    > HOWTO: Set Duplex Printing for Word Automation
    >
    > http://support.microsoft.com/default...b;en-us;190218
    > HOWTO: Retrieve Settings From a Printer Driver
    >
    > http://support.microsoft.com/default...b;en-us;180645
    > FIX: Cannot Change Page Settings During Print Job
    >
    > http://support.microsoft.com/default...b;en-us;266767
    > HOWTO: Set Which Printer Is the System Default Printer
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Carl" <[email protected]> wrote in message
    > news:[email protected]...
    > >I just purchased a new Laserjet 1320tn printer and would like to know if
    > > anyone knows how to access the printer properties thru VBA. I run various
    > > VBA macros when printing reports from several worksheets and would like to
    > > be
    > > able to turn duplex printing on and/or off as well as select which tray
    > > I'm
    > > pringing from.
    > >
    > > All I can find in the VBA help is the ActivePrinter which I use to select
    > > the printer I want to use and ActiveWindow.SelectedSheets.Printout to set
    > > some options (copies, collate, etc.).
    > >
    > > Any help would be greatly apprecitaed.
    > >
    > > Carl White

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1