Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fit to page
I have a print macro which I am having difficulty forcing it to fit to the
printed page when printing. It insists on using two pages if it is a wide print area. The procedure I have seems very simple and works fine in all areas except this. Sub OSect12Pr() ActiveSheet.PageSetup.PrintArea = "" ActiveSheet.PageSetup.PrintArea = "$AU$2:$BI$27" With ActiveSheet.PageSetup .LeftMargin = Application.InchesToPoints(0.15748031496063) .RightMargin = Application.InchesToPoints(0.15748031496063) .TopMargin = Application.InchesToPoints(0.393700787401575) .BottomMargin = Application.InchesToPoints(0.393700787401575) .HeaderMargin = Application.InchesToPoints(0.511811023622047) .FooterMargin = Application.InchesToPoints(0.511811023622047) .Orientation = xlLandscape .Draft = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, Collate:= _ True End Sub I have run the procedure using the macro recorder to see where I was goig wrong but I still ge problems. There are a whole range of worksheets in workbook abd each sheet will have its own print area and will be printed from the active sheet. I would welcome any help. Kind Regards Graham Haughs Turriff, Scotland. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fit to page
I think I may have got this. I put in the line
..Zoom = False This seems to have done the trick but if anyone thinks I am still off the target then please let me know. Graham "Graham Haughs" wrote in message ... I have a print macro which I am having difficulty forcing it to fit to the printed page when printing. It insists on using two pages if it is a wide print area. The procedure I have seems very simple and works fine in all areas except this. Sub OSect12Pr() ActiveSheet.PageSetup.PrintArea = "" ActiveSheet.PageSetup.PrintArea = "$AU$2:$BI$27" With ActiveSheet.PageSetup .LeftMargin = Application.InchesToPoints(0.15748031496063) .RightMargin = Application.InchesToPoints(0.15748031496063) .TopMargin = Application.InchesToPoints(0.393700787401575) .BottomMargin = Application.InchesToPoints(0.393700787401575) .HeaderMargin = Application.InchesToPoints(0.511811023622047) .FooterMargin = Application.InchesToPoints(0.511811023622047) .Orientation = xlLandscape .Draft = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, Collate:= _ True End Sub I have run the procedure using the macro recorder to see where I was goig wrong but I still ge problems. There are a whole range of worksheets in workbook abd each sheet will have its own print area and will be printed from the active sheet. I would welcome any help. Kind Regards Graham Haughs Turriff, Scotland. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fit to page
No, that is what you need to do.
-- Regards, Tom Ogilvy "Graham" wrote in message ... I think I may have got this. I put in the line .Zoom = False This seems to have done the trick but if anyone thinks I am still off the target then please let me know. Graham "Graham Haughs" wrote in message ... I have a print macro which I am having difficulty forcing it to fit to the printed page when printing. It insists on using two pages if it is a wide print area. The procedure I have seems very simple and works fine in all areas except this. Sub OSect12Pr() ActiveSheet.PageSetup.PrintArea = "" ActiveSheet.PageSetup.PrintArea = "$AU$2:$BI$27" With ActiveSheet.PageSetup .LeftMargin = Application.InchesToPoints(0.15748031496063) .RightMargin = Application.InchesToPoints(0.15748031496063) .TopMargin = Application.InchesToPoints(0.393700787401575) .BottomMargin = Application.InchesToPoints(0.393700787401575) .HeaderMargin = Application.InchesToPoints(0.511811023622047) .FooterMargin = Application.InchesToPoints(0.511811023622047) .Orientation = xlLandscape .Draft = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, Collate:= _ True End Sub I have run the procedure using the macro recorder to see where I was goig wrong but I still ge problems. There are a whole range of worksheets in workbook abd each sheet will have its own print area and will be printed from the active sheet. I would welcome any help. Kind Regards Graham Haughs Turriff, Scotland. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fit to page
Thanks for the feedback Tom. It is a great thing reassurance.
Graham "Tom Ogilvy" wrote in message ... No, that is what you need to do. -- Regards, Tom Ogilvy "Graham" wrote in message ... I think I may have got this. I put in the line .Zoom = False This seems to have done the trick but if anyone thinks I am still off the target then please let me know. Graham "Graham Haughs" wrote in message ... I have a print macro which I am having difficulty forcing it to fit to the printed page when printing. It insists on using two pages if it is a wide print area. The procedure I have seems very simple and works fine in all areas except this. Sub OSect12Pr() ActiveSheet.PageSetup.PrintArea = "" ActiveSheet.PageSetup.PrintArea = "$AU$2:$BI$27" With ActiveSheet.PageSetup .LeftMargin = Application.InchesToPoints(0.15748031496063) .RightMargin = Application.InchesToPoints(0.15748031496063) .TopMargin = Application.InchesToPoints(0.393700787401575) .BottomMargin = Application.InchesToPoints(0.393700787401575) .HeaderMargin = Application.InchesToPoints(0.511811023622047) .FooterMargin = Application.InchesToPoints(0.511811023622047) .Orientation = xlLandscape .Draft = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, Collate:= _ True End Sub I have run the procedure using the macro recorder to see where I was goig wrong but I still ge problems. There are a whole range of worksheets in workbook abd each sheet will have its own print area and will be printed from the active sheet. I would welcome any help. Kind Regards Graham Haughs Turriff, Scotland. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2010 files as web page or single file web page | Excel Discussion (Misc queries) | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
Hiding the page number in page break preview background. | Excel Discussion (Misc queries) |