我需要訪問作者,組織等Power Point屬性..訪問C#中Power Point文件的文檔屬性
我該怎麼做?
編輯:
這就是我想:
static void TestProperties(Presentation presentation) // Microsoft.Office.Interop.PowerPoint.Presentation;
{
Microsoft.Office.Core.DocumentProperties properties;
properties = (Microsoft.Office.Core.DocumentProperties)presentation.BuiltInDocumentProperties;
Microsoft.Office.Core.DocumentProperty prop;
}
這給了我ClassCastException異常:
無法投型 '系統.__ ComObject' 到接口類型「微軟的COM對象.Office.Core.DocumentProperties'
我有一個文件選擇器對話框,我選擇演示文稿,然後將其傳遞給TestProperties方法。
嘿,檢查編輯。 – vale4674 2012-01-03 15:24:59