bifftannen
New Member
- Joined
- Mar 18, 2019
- Messages
- 6
Good Day Gentleman,
I am hoping someone could help me out with the problem I am currently having - believe me that it would be beyond appreciated if anyone is willing to offer some of their time to help me with this.
Currently I have a very large spreadsheet(Approx 3080 Rows and with approx 908 columns) that I am working on exporting to PDF in 11x17 landscape mode.
Basically i've worked out how many columns and rows I can fit onto one page in Landscape @ 11x17 and my plan is to just break this document into sections going from top to bottom, and then move onto the next set of columns where I would go top to bottom all the way to the bottom row, then continue on.
Currently the code above works great. It will render 85 pages using columns A to AN on each page while incrementing the rows as the pages go on. So I get a great 11x17 landscape PDF document output as I want.
The problem I am having is I need to somehow move on to range "("AO1:CO3080")" and do the same thing so it builds 85 more pages to the same document with each page using columns AO to CO while incrementing the rows as the pages go on. And then after that i would do range ("CP1:DQ3080") etc, etc, etc.
Is there anyway to do this? I think one way of doing this would be running my function above, writing the PDF file, then changing the range to AO1:CO3080 and appending 85 more pages to that same PDF document, etc, etc. BUT the problem with that is I would need Adobe Acrobat Pro (which i cannot afford) in order to use their API to append documents.
Is there a way to do this using VBA only?
I've attached this quick drawing I made to kind of go along with my explanation (may or may not be helpful - if there is anything you need from me please let me know)
**Many thanks to anyone willing to spare some time to help me out here. Will pay it forward
I am hoping someone could help me out with the problem I am currently having - believe me that it would be beyond appreciated if anyone is willing to offer some of their time to help me with this.
Currently I have a very large spreadsheet(Approx 3080 Rows and with approx 908 columns) that I am working on exporting to PDF in 11x17 landscape mode.
Basically i've worked out how many columns and rows I can fit onto one page in Landscape @ 11x17 and my plan is to just break this document into sections going from top to bottom, and then move onto the next set of columns where I would go top to bottom all the way to the bottom row, then continue on.
Code:
Sub DebugPrint()
With ActiveSheet.PageSetup
.PrintArea = Range("A1:AN3080").Address
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = False
.PaperSize = xlPaper11x17
End With
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:="C:\Test.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End Sub
Currently the code above works great. It will render 85 pages using columns A to AN on each page while incrementing the rows as the pages go on. So I get a great 11x17 landscape PDF document output as I want.
The problem I am having is I need to somehow move on to range "("AO1:CO3080")" and do the same thing so it builds 85 more pages to the same document with each page using columns AO to CO while incrementing the rows as the pages go on. And then after that i would do range ("CP1:DQ3080") etc, etc, etc.
Is there anyway to do this? I think one way of doing this would be running my function above, writing the PDF file, then changing the range to AO1:CO3080 and appending 85 more pages to that same PDF document, etc, etc. BUT the problem with that is I would need Adobe Acrobat Pro (which i cannot afford) in order to use their API to append documents.
Is there a way to do this using VBA only?
I've attached this quick drawing I made to kind of go along with my explanation (may or may not be helpful - if there is anything you need from me please let me know)
**Many thanks to anyone willing to spare some time to help me out here. Will pay it forward