Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]()
Hi Michelle,
If you receive a workbook via email it will already be set up for printing so you would have to override with a macro. If not familiar with macros see my page on Getting Started with macros http://www.mvps.org/dmcritchie/excel/getstarted.htm The following macro will lettersize all sheets in the active workbook. It could perhaps be made more foolproof by checking first if the sheetsize had been set to legal. Debug statements could also be added with the checking to indicate what was changed. Anything preceded by a single quote is commented out, Sub Lettersize_allsheets() Dim wkSheet As Worksheet For Each wkSheet In Application.ActiveWorkbook With wkSheet.PageSetup .PaperSize = xlPaperLetter ' .FitToPagesWide = 1 ' .FitToPagesTall = False End With Next wkSheet End Sub Here is a different macro to Change all selected (Grouped) sheets to lettersize and Fit to pagesWide = 1 and PagesTall to 1 I don't recommend doing this to a workbook so have purposely limited it to Grouped sheets.i Sub FitSheets_1_Tall() Dim wkSheet As Worksheet ' For Each wkSheet In Application.ActiveWorkbook '- change to the ones that are grouped For Each wkSheet In Application.ActiveWorkbook. _ Windows(1).SelectedSheets With wkSheet.PageSetup PaperSize = xlPaperLetter .FitToPagesWide = 1 'or use = False .FitToPagesTall = 1 'or use = False End With Next wkSheet If Application.ActiveWorkbook. _ Windows(1).SelectedSheets.Count 1 Then MsgBox "Please UNGROUP sheets to avoid damaging workbook" End If End Sub. Possibly you could make the top and bottom margins smaller. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Michelle - BR" wrote ... Is there anyway to have all workbooks AUTOMATICALLY print to fit 1 page. Mainly when I open spreadsheets that are emailed to me. Most people email me a legal size spreadsheet and I need to shrink it to fit a letter size page. Maybe a global setting in the program or something? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Global Macro | New Users to Excel | |||
Training via excel via Global Knowledge,Inc.? | New Users to Excel | |||
How do you change sort defaults for combined text number & hyphen. | Excel Discussion (Misc queries) | |||
How to reset Excel 2000 toolbars to "factory defaults"? | Excel Discussion (Misc queries) | |||
GLOBAL search and replace | New Users to Excel |