Rx_
Nothing In Moderation
- Local time
- Today, 01:18
- Joined
- Oct 22, 2009
- Messages
- 2,803
All new portables at my place are now loaded with Office 2010. Of course the manager is the first to receive a new Portable today.
In Access / Excel 2007, the Access program creates custom and complex reports using Excel VBA. All the Excel report in Access 2007 work fine. The new Access / Excel 2010 does not include the page size. Since the paper size is blank, the 11x17 formatted reports are hosed.
An Access button creates an Excel workbook (a.k.a the report) and saves it on the network folder.
All the Access 2007 / Excel 2007 reports worked perfectlly.
When Access 2010 opens up the older Excel 2007 reports, the paper size is there. And they print perfectlly.
But, if Access 2010 creates the Excel report (now in Excel 2010) and saves it on the network folder, the page size is blank. The user can add the page size to the saved Excel 2010 file. But, of course requiring the user to manually add that value is not really automation.
This probably means that there is a difference between VBA for Excel 2007 and Excel 2010.
Of course! The programmer doesn't have Office 2010 to test. Can someone with Office 2010 look into this and provide a suggestion?
Here is the code that works perfectlly in Access 2007:
Code:
2750 With ObjXL.ActiveSheet.PageSetup
2760 .PrintHeadings = False
2770 .PrintGridlines = False
2780 .PrintComments = xlPrintNoComments
2790 .PrintQuality = 600
2800 .CenterHorizontally = False
2810 .CenterVertically = False
2820 .Orientation = xlLandscape
2830 .Draft = False
2840 .PaperSize = xlPaper11x17
2850 .FirstPageNumber = xlAutomatic
2860 .Order = xlOverThenDown
2870 .BlackAndWhite = False
2880 .Zoom = 56
'.PrintErrors = xlPrintErrorsDisplayed
2890 .OddAndEvenPagesHeaderFooter = False
2900 .DifferentFirstPageHeaderFooter = False
2910 .ScaleWithDocHeaderFooter = True
2920 .AlignMarginsHeaderFooter = True
2930 .PrintTitleRows = "$1:$" & (intRowPos - 1) ' repeats header row 1 to 5
2940 .LeftFooter = "Page &P of &N"
2950 .RightFooter = "&D"
2960 End With