TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
CustomDocuments Properties in Excel
Mar 2 2003 4:55 PM
I don't have any compile errors, but at run time I get and Invalid Cast Type. I have tried boxing the type, but that does not work. Here is what my Code Looks like: Microsoft.Office.Core.DocumentProperties cdp; Microsoft.Office.Introp.Excel.Application app; Microsoft.Office.Introp.Excel.Workbook wb; app = new Microsoft.Office.Introp.Excel.Application(); wb = app.workbooks.open(Filename, Missing.Value ....); cdp = (Microsoft.Office.Core.DocumentProperties)wb.CustomDocumentProperties; // Error Happens Here foreach(Microsoft.Office.Introp.Core.DocumentProperty dp in cdp) { .... }
Reply
Answers (
0
)
Copy existing worksheet data into another worksheet
Handling events from a COM server