Print Multiple Prin Ranges to PDF as one document

  • Hi All,

    Struggling with some VBA to print multiple print ranges to one document ( 3 pages)
    Code below is my attempt so far but I am not sure how to print an array for multiple ranges !

    Any thoughts please?
    I know the code needs cleaning up somewhat and would also appreciate some help there too.

  • Code
    PrntArea = Array("$D$1:$M$40", "$D$42:$M$67", "$D$69:$M$90")

    Have you tried setting the print area to D1:M90, insert horizontal page breaks at the appropiate rows and hide the rows you don't want to print?
    Reset back to regular after printing.

  • See if you can play with this to make it work.
    The first two lines are because of a problem with page breaks in excel

  • Hi

    I initially had the range set as you mentioned but could not get manual page breaks to set. I believe the issue there was related to "Fit pages to 1 sheet wide by 3 sheets tall. This messed things up every time and could not change the page breaks in VBA.

    I'm not full conversant with VBA or formulas come to that, and don't really understand how to implement your proposal.

    Any chance you could take a look at my code and implement something there that will run a print for the 3 ranges into one document??


  • Maybe try this

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!