LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default C# Automation problem

I don't have VS 2005 Tools for MS Office, so I am trying to do this the old
fashioned way with automation.

I have created the Excel application, and am trying to set the document
properties, such as Title and Author. To that end I have a reference to
Microsoft.Office.Core and am trying to assign
workbook.BuiltinDocumentProperties to a DocumentProperties object (with the
appropriate casting).

I get this exception:

System.InvalidCastException : Unable to cast COM object of type
'System.__ComObject' to interface type
'Microsoft.Office.Core.DocumentProperties'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{2DF8D04D-5BFA-101B-BDE5-00AA0044DE52}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).

Help!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel automation problem Arvi Laanemets Excel Programming 3 April 13th 06 09:22 AM
Office automation problem vba_nerd Excel Programming 0 April 6th 06 11:31 AM
C++ automation problem [email protected] Excel Programming 0 March 24th 06 05:48 PM
Excel Automation Problem With Add-Ins pagates Excel Programming 4 October 6th 05 05:18 PM
Automation problem Tim Long Excel Programming 5 July 20th 05 03:51 PM


All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"