Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing macro (Office 2000)

    Looking for a printing macro that will print the current page and any number of pages after.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printing macro (Office 2000)

    If your document has one section and "standard" page numbering, the following will do it:

    Sub PrintFromCurrent()
    ActiveDocument.PrintOut Range:=wdPrintFromTo, _
    From:=CStr(Selection.Information(wdActiveEndPageNu mber))
    End Sub

    The underscore is the line continuation character; it must be preceded by a space.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing macro (Office 2000)

    Hans,

    Is there a way to modify this macro to print, say, the current page and the next two, no matter how long the document is?

    Dan

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printing macro (Office 2000)

    Yes:

    Sub PrintFromCurrent()
    ActiveDocument.PrintOut Range:=wdPrintFromTo, _
    From:=CStr(Selection.Information(wdActiveEndPageNu mber)), _
    To:=CStr(Selection.Information(wdActiveEndPageNumb er) + 2)
    End Sub

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing macro (Office 2000)

    Thanks, that works great!!! <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

  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: Printing macro (Office 2000)

    One more option: select (with the mouse or shift+arrows, etc.) the page range you want and print that with a macro. See <post#=272396>post 272396</post#> for the code that prints the whole page with normal headers and footers, unlike the Selection button in the print dialog.

Posting Permissions

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