none
Print Current Page macro not working RRS feed

  • Question

  • Am using: 
    Application.PrintOut Range:=wdPrintCurrentPage 

    If the screen is showing, for example, the bottom of page 1 and the top of page 2 in Print Layout view, and the cursor is in the top of page 2, the print current page macro prints page 1 instead of page 2.  However, if the cursor is in the same place, but the view is Draft, then page 2 prints correctly.  Or if the full page 2 is displaying on the screen, and the cursor is near the top of page 2, then page 2 correctly prints.

    The problem appears to be some type of screen/refresh problem.  Anyone else experience it or have a solution?  The work around I used is to code a flip to Draft View in the macro before the printing and flip back afterwards.

    Thursday, October 11, 2012 7:53 AM

All replies

  • Are you sure the # for the page you want to print is showing on the status bar?

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Thursday, October 11, 2012 10:13 AM
  • yes, it is
    Friday, October 12, 2012 10:06 PM
  • I can only replicate that behaviour if there is non-printing hidden text before the active page, thus causing a change in pagination for printing purposes.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by Leo_GaoModerator Thursday, October 18, 2012 2:15 AM
    • Unmarked as answer by orlandp Sunday, October 28, 2012 11:28 PM
    Friday, October 12, 2012 11:30 PM
  • There is no hidden text.  I have checked.  If the document is viewed in Draft mode there is no issue, so I included in the code to test view mode, then switch to draft and back to default.  Not very pretty, but now I can print the current page without fail.
    Sunday, October 28, 2012 11:30 PM
  • There should be no need to do that. That you find it necessary suggests that either there is some content before the printed page that does not get printed or the document is corrupt.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Sunday, October 28, 2012 11:50 PM
  • None that I can detect.  Let me know how to best supply a sample document.  Thank you.
    Sunday, October 28, 2012 11:58 PM
  • You could upload the document to a free file-hosting site like http://www.4shared.com, then post a link here.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, October 29, 2012 12:09 AM