Click here to Skip to main content
15,886,798 members
Home / Discussions / C#
   

C#

 
GeneralRe: Qyery Builder Pin
Pete O'Hanlon17-Apr-08 1:30
mvePete O'Hanlon17-Apr-08 1:30 
QuestionMultiple DataKey Pin
frian_sf16-Apr-08 22:42
frian_sf16-Apr-08 22:42 
GeneralRe: Multiple DataKey Pin
Reelix17-Apr-08 19:48
Reelix17-Apr-08 19:48 
GeneralZip multiple files Pin
JustRonald16-Apr-08 22:35
JustRonald16-Apr-08 22:35 
QuestionControlCollection Question Pin
Programm3r16-Apr-08 22:26
Programm3r16-Apr-08 22:26 
AnswerRe: ControlCollection Question Pin
Simon P Stevens16-Apr-08 23:25
Simon P Stevens16-Apr-08 23:25 
GeneralRe: ControlCollection Question Pin
Programm3r17-Apr-08 19:31
Programm3r17-Apr-08 19:31 
GeneralFetching meta data of MS Office files [modified] Pin
sachinkalse16-Apr-08 21:36
sachinkalse16-Apr-08 21:36 
We are trying to fetch Author, Company Name and Creation Date of MS Office Files (.doc, .docx, .xls, .xlsx, .ppt, .pptx) using following code

protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
        string strFileName = string.Empty;<br />
        strFileName = @"D:\My File.pptx";<br />
<br />
        DSOFile.SummaryProperties DSOSummaryProperties;<br />
        DSOFile.OleDocumentPropertiesClass OleFile;<br />
        OleFile = new OleDocumentPropertiesClass();<br />
        OleFile.Open(strFileName, true, dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);<br />
        DSOSummaryProperties = OleFile.SummaryProperties;<br />
<br />
        Response.Write("Author : " + DSOSummaryProperties.Author);<br />
        Response.Write(" Company : " + DSOSummaryProperties.Company);<br />
        Response.Write(" Date Created : " + DSOSummaryProperties.DateCreated);<br />
        OleFile.Close(false);<br />
<br />
    }


This works well in many conditions except stated below

1. If we try to rename .docx as .doc or .xlsx as .xls or .pptx as .ppt
In this situation no data is fetched, but no error too

2. When file is created like,
Right Click in any drive -> New ->
New Microsoft Office Word Document.docx
or
New Microsoft Office Excel Worksheet.xlsx
or
New Microsoft Office PowerPoint Presentation.pptx

In this case while opening the file following error is generated
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

Please guide, if any one knows the reason behind.

More over how to fetch meta data of .xps files?

modified on Thursday, April 17, 2008 4:06 AM

GeneralRe: Fetching meta data of MS Office files Pin
Member 769142521-Feb-11 1:10
Member 769142521-Feb-11 1:10 
QuestionHow to open a XML file without validating? Pin
Hariharan210516-Apr-08 20:25
Hariharan210516-Apr-08 20:25 
AnswerRe: How to open a XML file without validating? Pin
pmarfleet16-Apr-08 22:39
pmarfleet16-Apr-08 22:39 
GeneralRe: How to open a XML file without validating? Pin
Hariharan210517-Apr-08 3:30
Hariharan210517-Apr-08 3:30 
General[Message Deleted] Pin
wwwxyz16-Apr-08 20:18
wwwxyz16-Apr-08 20:18 
GeneralRe: write to a txt file Pin
Reelix16-Apr-08 20:36
Reelix16-Apr-08 20:36 
GeneralRe: write to a txt file Pin
wwwxyz17-Apr-08 6:33
wwwxyz17-Apr-08 6:33 
GeneralRe: write to a txt file Pin
John_Adams16-Apr-08 20:40
John_Adams16-Apr-08 20:40 
GeneralRe: write to a txt file Pin
phannon8616-Apr-08 21:59
professionalphannon8616-Apr-08 21:59 
GeneralDownloading problem using c sharp Pin
Kashif Sabir16-Apr-08 19:24
Kashif Sabir16-Apr-08 19:24 
GeneralRe: Downloading problem using c sharp Pin
Expert Coming16-Apr-08 19:39
Expert Coming16-Apr-08 19:39 
QuestionTechnology Choice? Pin
Expert Coming16-Apr-08 19:23
Expert Coming16-Apr-08 19:23 
AnswerRe: Technology Choice? Pin
Thomas Stockwell17-Apr-08 1:16
professionalThomas Stockwell17-Apr-08 1:16 
QuestionHow to get the last day of the month. Pin
dougins16-Apr-08 19:15
dougins16-Apr-08 19:15 
GeneralRe: How to get the last day of the month. Pin
Expert Coming16-Apr-08 19:19
Expert Coming16-Apr-08 19:19 
GeneralRe: How to get the last day of the month. Pin
Luc Pattyn17-Apr-08 0:19
sitebuilderLuc Pattyn17-Apr-08 0:19 
Questionchanging the image DPI keeping the same size Pin
Faysal16-Apr-08 18:41
Faysal16-Apr-08 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.