Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Location
    Stockholm, Sweden
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Same prblm - new loginname (VB - VBA)

    Couldn

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Same prblm - new loginname (VB - VBA)

    Are you printing something in the body of the document/worksheet, or a UserForm? In the case of a document or worksheet the application's settings should (at least in theory) override the default printer driver settings. On the other hand, the facilities for printing UserForms seem rather limited. There was a thread either here or on the Word board on the Windows API call that specifies device options (the precise name eludes me, but I think you should be able to turn them up in a search).

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Location
    Stockholm, Sweden
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Same prblm - new loginname (VB - VBA)

    Which is nailing the problem; application settings (doc. settings) don't override the default printer settings. If only so were, but then again there would be no problem, however - they don't.
    Not sure I specified the problem clearly enough; what I want is making the actual form I use override ANY setting, be it defult printersetting directly on the actual printer, or from the application. What I want isn't World Domination or Eternal Joy, all I want is to make the form print one page at_a_time, no duplex (doublesided), no scaling - no nothing, just that - 1 page. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Same prblm - new loginname (VB - VBA)

    But my first question: what is the thing that you are trying to print? A VB UserForm or something native to the application (Word document, Excel sheet, etc.)? The application settings can only apply to native objects, they cannot apply to a VB UserForm. If you are trying to print a VB UserForm, look for the posts on the device options API.

  5. #5
    New Lounger
    Join Date
    Jan 2004
    Location
    Stockholm, Sweden
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Same prblm - new loginname (VB - VBA)

    Sorry - will try again.
    What I predominantly use are Forms for Word Documents. In these forms I use VBA code make/draw tables, inputboxes, headlines, where to save the outcome, how to name etc etc. This is fairly 'easy' to accomplish. However, printing isn't...
    I have not found any significant diffrence using other applications. I stick to VBA as VB won't pass through the firewalls we use at my job.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Same prblm - new loginname (VB - VBA)

    I really only know Word, but others can chime in for Excel.

    Are you printing using ActiveDocument.printOut or are you displaying the dialog? Either way, you should be able to pre-set many of the defaults and, at least in theory, override the printer driver.

    Can you post a snippet of your page setup/printer setup/printout code?

  7. #7
    New Lounger
    Join Date
    Jan 2004
    Location
    Stockholm, Sweden
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Same prblm - new loginname (VB - VBA)

    Word is what I use, mostly. Worldwide standard and all, might as well go along...

    I use ActiveDocument printOut (anything to avoid giving the use the slightest chance of confusing things...).
    Never did find a way to setup the printer via code though - we seem to circle nearer to the problem. Defining what is the problem is, as always, the bigger part of any problem.
    As I said, at least tried to; I' haven't been here (at the Lounge) more than an hour or so, and English is bur my third language - so if things have seen dim referring to what it is want - I'm solely accountable

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Same prblm - new loginname (VB - VBA)

    Well... the API calls are something you'll have to search here for, since I haven't worked with those before. But I'd like you to try the macro in the attached Word document just to confirm that Word itself is incapable of overriding those printer settings.

Posting Permissions

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