Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've already asked this question in the microsoft.public.dotnet.languages.vb
forum, but it has stumped them. I wondered if anyone had tried to access/set the workbook properties using VB .NET? When I try it, I get the following failure when trying to access the builtin properties; An unhandled exception of type 'System.InvalidCastException' occurred in resultsoutput.dll Additional information: Specified cast is not valid. In general terms the code is constructed as follows; ModuleA Public xlWb As Excel.Workbook ModuleB SubA Dim prps As Microsoft.Office.Core.DocumentProperties prps = DirectCast(xlWb.BuiltinDocumentProperties, Microsoft.Office.Core.DocumentProperties) This is using; Framework 1.1 Excel 2002 SP3 Reference to COM Microsoft Excel 10.0 Object Library (Version 1.4) I've been following the article by Ken Getz (http://msdn.microsoft.com/library/de...-us/odc_vsto20 03_ta/html/ExcelObj.asp) which suggests the code should work. Ken's article refers to Excel 2003, but all the objects he references are also in the Microsoft Excel 10 COM object. I wondered whether this was a bug in the 2002 COM or I've missed something in my code. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I access to property of chart object ? | Charts and Charting in Excel | |||
no builtin chart options for me..(Excel 2000)!! | Charts and Charting in Excel | |||
Network access to file - read only property | Excel Discussion (Misc queries) | |||
Workbook Builtin Property - display in Windows Explorer? | Excel Programming | |||
Access to class property in other workbook | Excel Programming |