I am trying to speed up page set in VBA and I am using the following code which is erroring out:
Application.ExecuteExcel4Macro ("Page.Setup(""&c&A"","&c "Page &P of &N"",0.75,0.75, 0.75,0.75,FALSE,FALSE,TRUE,FALSE,2,1,"",PAGE_NUMBER,PAGE_ORDER,FALSE,600,0.5,0.5,FALSE,FALSE)")
The original VBA is:
With ActiveSheet.PageSetup<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
.LeftHeader = ""<o></o>
.CenterHeader = "&A"<o></o>
.RightHeader = ""<o></o>
.LeftFooter = ""<o></o>
.CenterFooter = "Page &P of &N"<o></o>
.RightFooter = ""<o></o>
.LeftMargin = Application.InchesToPoints(0.236220472440945)<o></o>
.RightMargin = Application.InchesToPoints(0.236220472440945)<o></o>
.TopMargin = Application.InchesToPoints(0.708661417322835)<o></o>
.BottomMargin = Application.InchesToPoints(0.708661417322835)<o></o>
.HeaderMargin = Application.InchesToPoints(0.511811023622047)<o></o>
.FooterMargin = Application.InchesToPoints(0.511811023622047)<o></o>
.PrintHeadings = False<o></o>
.PrintGridlines = False<o></o>
.PrintComments = xlPrintNoComments<o></o>
.PrintQuality = 600<o></o>
.CenterHorizontally = False<o></o>
.CenterVertically = False<o></o>
.Orientation = xlLandscape<o></o>
.Draft = False<o></o>
.PaperSize = xlPaperA4<o></o>
.FirstPageNumber = xlAutomatic<o></o>
.Order = xlDownThenOver<o></o>
.BlackAndWhite = False<o></o>
.Zoom = False<o></o>
.FitToPagesWide = 1<o></o>
.FitToPagesTall = False<o></o>
.PrintErrors = xlPrintErrorsDisplayed<o></o>
.OddAndEvenPagesHeaderFooter = False<o></o>
.DifferentFirstPageHeaderFooter = False<o></o>
.ScaleWithDocHeaderFooter = True<o></o>
.AlignMarginsHeaderFooter = True<o></o>
.EvenPage.LeftHeader.Text = ""<o></o>
.EvenPage.CenterHeader.Text = ""<o></o>
.EvenPage.RightHeader.Text = ""<o></o>
.EvenPage.LeftFooter.Text = ""<o></o>
.EvenPage.CenterFooter.Text = ""<o></o>
.EvenPage.RightFooter.Text = ""<o></o>
.FirstPage.LeftHeader.Text = ""<o></o>
.FirstPage.CenterHeader.Text = ""<o></o>
.FirstPage.RightHeader.Text = ""<o></o>
.FirstPage.LeftFooter.Text = ""<o></o>
.FirstPage.CenterFooter.Text = ""<o></o>
.FirstPage.RightFooter.Text = ""<o></o>
End With<o></o>
Please help????
Application.ExecuteExcel4Macro ("Page.Setup(""&c&A"","&c "Page &P of &N"",0.75,0.75, 0.75,0.75,FALSE,FALSE,TRUE,FALSE,2,1,"",PAGE_NUMBER,PAGE_ORDER,FALSE,600,0.5,0.5,FALSE,FALSE)")
The original VBA is:
With ActiveSheet.PageSetup<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
.LeftHeader = ""<o></o>
.CenterHeader = "&A"<o></o>
.RightHeader = ""<o></o>
.LeftFooter = ""<o></o>
.CenterFooter = "Page &P of &N"<o></o>
.RightFooter = ""<o></o>
.LeftMargin = Application.InchesToPoints(0.236220472440945)<o></o>
.RightMargin = Application.InchesToPoints(0.236220472440945)<o></o>
.TopMargin = Application.InchesToPoints(0.708661417322835)<o></o>
.BottomMargin = Application.InchesToPoints(0.708661417322835)<o></o>
.HeaderMargin = Application.InchesToPoints(0.511811023622047)<o></o>
.FooterMargin = Application.InchesToPoints(0.511811023622047)<o></o>
.PrintHeadings = False<o></o>
.PrintGridlines = False<o></o>
.PrintComments = xlPrintNoComments<o></o>
.PrintQuality = 600<o></o>
.CenterHorizontally = False<o></o>
.CenterVertically = False<o></o>
.Orientation = xlLandscape<o></o>
.Draft = False<o></o>
.PaperSize = xlPaperA4<o></o>
.FirstPageNumber = xlAutomatic<o></o>
.Order = xlDownThenOver<o></o>
.BlackAndWhite = False<o></o>
.Zoom = False<o></o>
.FitToPagesWide = 1<o></o>
.FitToPagesTall = False<o></o>
.PrintErrors = xlPrintErrorsDisplayed<o></o>
.OddAndEvenPagesHeaderFooter = False<o></o>
.DifferentFirstPageHeaderFooter = False<o></o>
.ScaleWithDocHeaderFooter = True<o></o>
.AlignMarginsHeaderFooter = True<o></o>
.EvenPage.LeftHeader.Text = ""<o></o>
.EvenPage.CenterHeader.Text = ""<o></o>
.EvenPage.RightHeader.Text = ""<o></o>
.EvenPage.LeftFooter.Text = ""<o></o>
.EvenPage.CenterFooter.Text = ""<o></o>
.EvenPage.RightFooter.Text = ""<o></o>
.FirstPage.LeftHeader.Text = ""<o></o>
.FirstPage.CenterHeader.Text = ""<o></o>
.FirstPage.RightHeader.Text = ""<o></o>
.FirstPage.LeftFooter.Text = ""<o></o>
.FirstPage.CenterFooter.Text = ""<o></o>
.FirstPage.RightFooter.Text = ""<o></o>
End With<o></o>
Please help????