Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Word Macro to print current page to default printer and overide margin erro

    Is it possible to construct a word macro that when you hit say ctrl p it will print only the current page to the default printer and ignore the error message margins of section 1 are outside of printable area of the page do you wish to continue and it defaults to yes/?
    Thanks
    JR

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    JR,

    The following couple of lines of code should work, but apparently they don't:

    Code:
    Application.DisplayAlerts = wdAlertsNone
    ActiveDocument.PrintOut Range:=wdPrintCurrentPage
    - according to the Help topic for DisplayAlerts, setting it to wdAlertsNone should suppress the display of alerts and message boxes, and cause the default action for any message box to occur (in this case, proceed to print the page).

    But for some reason, the alert message displays anyway....

    Gary

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts

    thank you, yes the error message remains with the code

    thank you, yes the error message remains with the code
    thank you for trying
    jerome

Posting Permissions

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