BobBridges
Active Member
I've got an odd and rather picky issue. I'm exporting worksheets as PDFs, using the ExportAsFixedFormat method with Type:=xlTypePDF. The page has a corporate color as the background, and I want that color to go all the way to the bottom of the last printed page, rather than stop at the last row of the worksheet's data. I can accomplish this by putting some data in the last row of that page—just a space will do.
But how do I identify the worksheet row that will be the last row of the printed document? I can estimate it, but if there's a way to find it via a method or property, I'd rather do that. Anyone have any bright ideas?
Let me emphasize: Finding the last row of the data is trivial. But if that last row is only a few inches down from the top of the last page, it isn't what I want: I want the row that would be at the bottom of that page. So I have to identify the last page of the document (if possible), and then identify the worksheet row that will be at the bottom of that page (if possible).
But how do I identify the worksheet row that will be the last row of the printed document? I can estimate it, but if there's a way to find it via a method or property, I'd rather do that. Anyone have any bright ideas?
Let me emphasize: Finding the last row of the data is trivial. But if that last row is only a few inches down from the top of the last page, it isn't what I want: I want the row that would be at the bottom of that page. So I have to identify the last page of the document (if possible), and then identify the worksheet row that will be at the bottom of that page (if possible).