ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Ole Automation and Excel 2007 footer (https://www.excelbanter.com/excel-worksheet-functions/235828-ole-automation-excel-2007-footer.html)

Greborio Robert

Ole Automation and Excel 2007 footer
 
Till Excel 2003 the following row worked correctly:
Sheet.PageSetup.CenterFooter:='Print from...'; (Delphi 2009)
But now create an Exception irreparable Error!!
I've see in the VBA help the procedure is changed in Excel 2007. I've tried
various system but ever same error.

Can you help me?
Tks in advance.
Robert

Abdul

Ole Automation and Excel 2007 footer
 
With Sheets("SheetName").PageSetup

.CenterFooter = "test"

End With

works in Excel 2007

"Press YES if this post helps"

"Greborio Robert" wrote:

Till Excel 2003 the following row worked correctly:
Sheet.PageSetup.CenterFooter:='Print from...'; (Delphi 2009)
But now create an Exception irreparable Error!!
I've see in the VBA help the procedure is changed in Excel 2007. I've tried
various system but ever same error.

Can you help me?
Tks in advance.
Robert


Greborio Robert

Ole Automation and Excel 2007 footer
 
Tks Abdul this answer get me exact idea for write the procedure for Delphi
2009:

Sheet.Item['SheetName'].PageSetup.CenterFooter:='Print from...';

The MSOffice help is not very clear about this change. A three of all object
will be more interesting.

"Abdul" wrote:

With Sheets("SheetName").PageSetup

.CenterFooter = "test"

End With

works in Excel 2007

"Press YES if this post helps"

"Greborio Robert" wrote:

Till Excel 2003 the following row worked correctly:
Sheet.PageSetup.CenterFooter:='Print from...'; (Delphi 2009)
But now create an Exception irreparable Error!!
I've see in the VBA help the procedure is changed in Excel 2007. I've tried
various system but ever same error.

Can you help me?
Tks in advance.
Robert



All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com