+ Reply to Thread
Results 1 to 3 of 3

Printing Anomaly

  1. #1
    Otto Moehrbach
    Guest

    Printing Anomaly

    Excel 2002, WinXP
    I'm printing from a number of sheets and placing the print code within a
    With/End With construct. With each sheet I need the printed page sequence
    to be the last page first, so I'm using the Excel4 code as follows:
    Sub PrintBwd()
    With Sheets("PrintLtr")
    .PageSetup.PrintArea = RngToPrint.Address
    NumPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")
    For Page = NumPages To 1 Step -1
    .PrintOut from:=Page, To:=Page
    Next Page
    End With
    End Sub

    I'm getting erratic printing output which appears to be driven by which
    sheet is the active sheet. Specifically, the printing output is one or two
    pages short except when the sheeet to be printed is the active sheet. I
    have checked and re-checked my code and it all appears to be proper. The
    only wild card for me is the Excel4Macro about which I know nothing other
    than how to use it.
    My question: What sheet does the Excel4 macro operate on?
    Thanks for your help and time. Otto



  2. #2
    Dave Peterson
    Guest

    Re: Printing Anomaly

    You could just activate that sheet and be happy <bg>.

    or...

    NumPages = ExecuteExcel4Macro("get.document(50,""" & .Name & """)")

    Otto Moehrbach wrote:
    >
    > Excel 2002, WinXP
    > I'm printing from a number of sheets and placing the print code within a
    > With/End With construct. With each sheet I need the printed page sequence
    > to be the last page first, so I'm using the Excel4 code as follows:
    > Sub PrintBwd()
    > With Sheets("PrintLtr")
    > .PageSetup.PrintArea = RngToPrint.Address
    > NumPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")
    > For Page = NumPages To 1 Step -1
    > .PrintOut from:=Page, To:=Page
    > Next Page
    > End With
    > End Sub
    >
    > I'm getting erratic printing output which appears to be driven by which
    > sheet is the active sheet. Specifically, the printing output is one or two
    > pages short except when the sheeet to be printed is the active sheet. I
    > have checked and re-checked my code and it all appears to be proper. The
    > only wild card for me is the Excel4Macro about which I know nothing other
    > than how to use it.
    > My question: What sheet does the Excel4 macro operate on?
    > Thanks for your help and time. Otto


    --

    Dave Peterson

  3. #3
    Otto Moehrbach
    Guest

    Re: Printing Anomaly

    Dave
    You have come through again. I was looking at activating each sheet in
    turn and my OP has some 160 sheets. Thanks for your help and your time.
    Otto
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > You could just activate that sheet and be happy <bg>.
    >
    > or...
    >
    > NumPages = ExecuteExcel4Macro("get.document(50,""" & .Name & """)")
    >
    > Otto Moehrbach wrote:
    >>
    >> Excel 2002, WinXP
    >> I'm printing from a number of sheets and placing the print code within a
    >> With/End With construct. With each sheet I need the printed page
    >> sequence
    >> to be the last page first, so I'm using the Excel4 code as follows:
    >> Sub PrintBwd()
    >> With Sheets("PrintLtr")
    >> .PageSetup.PrintArea = RngToPrint.Address
    >> NumPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")
    >> For Page = NumPages To 1 Step -1
    >> .PrintOut from:=Page, To:=Page
    >> Next Page
    >> End With
    >> End Sub
    >>
    >> I'm getting erratic printing output which appears to be driven by which
    >> sheet is the active sheet. Specifically, the printing output is one or
    >> two
    >> pages short except when the sheeet to be printed is the active sheet. I
    >> have checked and re-checked my code and it all appears to be proper. The
    >> only wild card for me is the Excel4Macro about which I know nothing other
    >> than how to use it.
    >> My question: What sheet does the Excel4 macro operate on?
    >> Thanks for your help and time. Otto

    >
    > --
    >
    > Dave Peterson




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1