Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Set Printer Stapling

Set Printer Stapling

Scheduled Pinned Locked Moved Visual Basic
comtoolsjsonhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Edbert P
    wrote on last edited by
    #1

    First, sorry for reposting this again (previous post)[^], however I have had not much luck researching this one, so I just want to ask for tips/hints on this matter. The problem: I need to set the stapling capability of a printer before printing a document (in a Word global template, i.e. VBA code). I have found an API to set printer duplexing, which unfortunately does not include setting the stapling. I've had a look at PDL (Page Description Language) but I find that it will be too complex to put the PDL command on top of the document file before printing it out. If anyone has ever done this before can you please inform me on how to set printer stapling? Thanks, Edbert P. Edbert P. Sydney, Australia.

    D 1 Reply Last reply
    0
    • E Edbert P

      First, sorry for reposting this again (previous post)[^], however I have had not much luck researching this one, so I just want to ask for tips/hints on this matter. The problem: I need to set the stapling capability of a printer before printing a document (in a Word global template, i.e. VBA code). I have found an API to set printer duplexing, which unfortunately does not include setting the stapling. I've had a look at PDL (Page Description Language) but I find that it will be too complex to put the PDL command on top of the document file before printing it out. If anyone has ever done this before can you please inform me on how to set printer stapling? Thanks, Edbert P. Edbert P. Sydney, Australia.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      I can't find a single code example (in any language) that even comes close to what you want. The only example I could find is buried inside driver code, which won't help you because your not doing the actual job assembly and printing. There are a couple of problems: 1. You need to set the stapling in PageSetup of the document before it is printed. This will not be accomplished using the API calls. What you've been looking at is setting the default for the printer for ALL documents being printed by ALL applications. 2. Since not all printers support stapling and the ones that do require you to send different data structures to enable stapling, coding this is going to be a GIANT pain. If your doing this as a document template, you should be able to start a document, using the printer with stapling as the default printer, go into PageSetup and set everything you need to, including stapling, then setup your documents properties the way you want, then just save the template as a .DOT file. When you create a document using that template, stapling SHOULD be enabled, and not if the printer doesn't support it. The above has NOT been tested since I don't have access to ANY printers that support stapling (rare, but cool, beasts that they are.) RageInTheMachine9532

      E 1 Reply Last reply
      0
      • D Dave Kreskowiak

        I can't find a single code example (in any language) that even comes close to what you want. The only example I could find is buried inside driver code, which won't help you because your not doing the actual job assembly and printing. There are a couple of problems: 1. You need to set the stapling in PageSetup of the document before it is printed. This will not be accomplished using the API calls. What you've been looking at is setting the default for the printer for ALL documents being printed by ALL applications. 2. Since not all printers support stapling and the ones that do require you to send different data structures to enable stapling, coding this is going to be a GIANT pain. If your doing this as a document template, you should be able to start a document, using the printer with stapling as the default printer, go into PageSetup and set everything you need to, including stapling, then setup your documents properties the way you want, then just save the template as a .DOT file. When you create a document using that template, stapling SHOULD be enabled, and not if the printer doesn't support it. The above has NOT been tested since I don't have access to ANY printers that support stapling (rare, but cool, beasts that they are.) RageInTheMachine9532

        E Offline
        E Offline
        Edbert P
        wrote on last edited by
        #3

        Thanks a lot for the effort (and the explanation) :) I will continue searching for this and if I find anything I will post it for everyone. Edbert P. Sydney, Australia.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups