Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to find all properties of a word file using asp.net code(like details,prev version,security,fileseclore etc).specially I want to see the property shown as different tab when we right click on a work file


What I have tried:

FileInfo object used but all properties not able to access.
Posted
Updated 23-Feb-18 4:32am

Searched in Google and found following which may help.
How to: Read from and Write to Document Properties[^]
Document properties (Microsoft.Office.Interop.Word)[^]

Hope, it helps :)
 
Share this answer
 
Comments
Richard Deeming 23-Feb-18 10:23am    
NB: Interop can't be used from ASP.NET:

Considerations for server-side Automation of Office[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
Suvendu Shekhar Giri 26-Feb-18 2:55am    
Thanks for educating!
If you're only looking at Word 2007 files (*.docx), then DocX[^] can read them.

(It's a free and open-source version of a commercial product, but so far the only differences are that it doesn't come with support, and the free version can't convert to PDF.)

Alternatively, you can use the OpenXML SDK:
Retrieving Custom Properties from Word 2010 Documents by Using the Open XML SDK 2.0.[^]

To support the older file format (*.doc), there's an ancient tool available from Microsoft:
Download Microsoft Developer Support OLE File Property Reader 2.1 Sample (KB 224351) from Official Microsoft Download Center[^]
However, given the age, there's no guarantee it will still work.

NB: You can't use Office Interop from ASP.NET:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900