Results 1 to 6 of 6

Thread: Printing MSWord Documents from VBA

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    15

    Printing MSWord Documents from VBA

    I have generated some MSWord documents, and know how to print them from my VBA code, but I would like to be able to set certain print options automatically for certain documents, such as printing in full duplex (my printer can print to both sides) and specifying which pages to print. How do I do these in VBA code, and is there a guide somewhere that lists all the available printer commands?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Printing MSWord Documents from VBA

    Here you go:

    Printer Constants

    I found these, and saved them.

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    15

    Re: Printing MSWord Documents from VBA

    Thanks dglienna! That list had the constant for duplex printing. I'll try it tomorrow and let you know how it works.

    Now if I could only figure out how to print specific pages...?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printing MSWord Documents from VBA

    Moved to Office Development.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    15

    Re: Printing MSWord Documents from VBA

    How would I specific printer constants? I tried this:

    Me.Printer.Duplex = acPRDPHorizontal
    WordObj.PrintOut

    But it didn't come out full duplex.

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Printing MSWord Documents from VBA


Posting Permissions

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



Click Here to Expand Forum to Full Width