cancel
Showing results for 
Search instead for 
Did you mean: 

Upgraded and getting: Error accessing external object property papersize

Former Member
0 Kudos

We have moved the PB app (12.0)  to a new machine and upgraded our OS from Windows 7 to Windows 8.

And now we are getting the error: Error accessing external object property papersize... orientation... margin

Using OLE and exporting to EXCEL

The app works when I run it as an exe BUT when it is ran as a service it errors when trying to

use OLE to change papersize, orientation ... margin.  I have commented out one statement and it

errors on the next.  BUT it works if I run it as a service (but they were before the upgrade):

NONE OF THESE STATEMENTS work running PB exe as a service:

ExcelApp.Application.ActiveSheet.PageSetup.PaperSize = lnv_Excel.xlPaperLetter

ExcelApp.Application.ActiveSheet.PageSetup.Orientation = lnv_Excel.xlLandscape

ExcelApp.Application.ActiveSheet.PageSetup.LeftMargin = 0

ExcelApp.Application.ActiveSheet.PageSetup.RightMargin = 0

ExcelApp.Application.ActiveSheet.PageSetup.TopMargin = ExcelApp.Application.InchesToPoints ( 0.67 )

ExcelApp.Application.ActiveSheet.PageSetup.BottomMargin = ExcelApp.Application.InchesToPoints ( 0.7 )

ExcelApp.Application.ActiveSheet.PageSetup.HeaderMargin = 0

ExcelApp.Application.ActiveSheet.PageSetup.FooterMargin = 0

SO MANY THANKS!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

FIXED!!!

Microsoft upgrade made OLE stop working.

We doanloaded the fix and it works.

Search:Form Controls stop working after December 2014 Updates