Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a reporting application I am building a single sheet with many different
print areas as a report. However, when I choose printout all of the areas are presented on a single with the zoom factor set very low (like 5%). I cannot find a way to make this behaviour stop. Is it a general setting or is it something I can control through the code. It should be mentionened that my spreadsheet is embedded as an OLE object in a VB form. Thus I do not have access to the full object model of Excel but only the single sheet in the workbook: Dim shPrint As Object ' extra ref to the Worksheet object in the OLE object container that we will work with Dim sPrtAreaAdr As String Set shPrint = OLE_keyfig(5).object.Sheets(1) shPrint.Range("A202:J1200").Value = "" ' Setting a range to to a prepared array shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value = arrKortXL Dim iKort As Integer ' This is an effort to stop display in one page by defining separate print area entries in the range string Do While iKort < UBound(arrKortXL, 1): sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" & CStr(200 + iKort + 79) iKort = iKort + 80 Loop shPrint.PageSetup.PrintArea = sPrtAreaAdr shPrint.PrintOut Preview:=True The above still produces one printout page in the preview with the zoom set to a very low figure. I want a new page per 80 lines. I could define each 80 lines separately and printout right away before defining the next, but then my footer with page number and total number of pages won't make any sense. Hope that someone can help. With kind regards, Frank M. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frank,
On the print setup dialog, do you have the Scaling Fit To option selected. NickHK "Frank M." wrote in message ... In a reporting application I am building a single sheet with many different print areas as a report. However, when I choose printout all of the areas are presented on a single with the zoom factor set very low (like 5%). I cannot find a way to make this behaviour stop. Is it a general setting or is it something I can control through the code. It should be mentionened that my spreadsheet is embedded as an OLE object in a VB form. Thus I do not have access to the full object model of Excel but only the single sheet in the workbook: Dim shPrint As Object ' extra ref to the Worksheet object in the OLE object container that we will work with Dim sPrtAreaAdr As String Set shPrint = OLE_keyfig(5).object.Sheets(1) shPrint.Range("A202:J1200").Value = "" ' Setting a range to to a prepared array shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value = arrKortXL Dim iKort As Integer ' This is an effort to stop display in one page by defining separate print area entries in the range string Do While iKort < UBound(arrKortXL, 1): sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" & CStr(200 + iKort + 79) iKort = iKort + 80 Loop shPrint.PageSetup.PrintArea = sPrtAreaAdr shPrint.PrintOut Preview:=True The above still produces one printout page in the preview with the zoom set to a very low figure. I want a new page per 80 lines. I could define each 80 lines separately and printout right away before defining the next, but then my footer with page number and total number of pages won't make any sense. Hope that someone can help. With kind regards, Frank M. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right that was what I was looking for. Thanks for the help
Frank M. "NickHK" wrote in message ... Frank, On the print setup dialog, do you have the Scaling Fit To option selected. NickHK "Frank M." wrote in message ... In a reporting application I am building a single sheet with many different print areas as a report. However, when I choose printout all of the areas are presented on a single with the zoom factor set very low (like 5%). I cannot find a way to make this behaviour stop. Is it a general setting or is it something I can control through the code. It should be mentionened that my spreadsheet is embedded as an OLE object in a VB form. Thus I do not have access to the full object model of Excel but only the single sheet in the workbook: Dim shPrint As Object ' extra ref to the Worksheet object in the OLE object container that we will work with Dim sPrtAreaAdr As String Set shPrint = OLE_keyfig(5).object.Sheets(1) shPrint.Range("A202:J1200").Value = "" ' Setting a range to to a prepared array shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value = arrKortXL Dim iKort As Integer ' This is an effort to stop display in one page by defining separate print area entries in the range string Do While iKort < UBound(arrKortXL, 1): sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" & CStr(200 + iKort + 79) iKort = iKort + 80 Loop shPrint.PageSetup.PrintArea = sPrtAreaAdr shPrint.PrintOut Preview:=True The above still produces one printout page in the preview with the zoom set to a very low figure. I want a new page per 80 lines. I could define each 80 lines separately and printout right away before defining the next, but then my footer with page number and total number of pages won't make any sense. Hope that someone can help. With kind regards, Frank M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I print multiple print areas on one page | Excel Discussion (Misc queries) | |||
print areas on one page to print? | Excel Discussion (Misc queries) | |||
How to Print different areas on one page | Excel Discussion (Misc queries) | |||
Can i print non-contiguous areas on one page?? | Excel Discussion (Misc queries) | |||
Can i print non-contiguous areas on one page | Excel Worksheet Functions |