Click here to Skip to main content
16,011,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Guys,
Again - buggin with the "twisted" problem :)

Recently I have been building automatic load function, that would load specific files into SharePoint, but bumped into issue:
Each time the person download the file from sharepoint that file has additional properties called "Document Properties - Server". And there is a property called "Date" and property called "Title". When I load the files back into SharePoint I am setting my Custom "Date" property using this:
C#
dynamic properties;
properties = WorkbookObject.CustomDocumentProperties;
properties.Add("Date", 
                false, 
                Microsoft.Office.Core.MsoDocProperties.msoPropertyTypeDate, 
                DateTime.Now, Type.Missing);


So now I am having 2 properties with name "Date".
Does anyone know how to get rid of the "server" type properties from MS Office file?

I know that manually you can do by clicking on MS Office inco in the top-left corner --> Prepare --> Inspect Document --> Check the tick on "Document Properties and Personal Information" --> [button] Inspect --> [button] Remove All....
But I don't want the user to it all the time... how to do it programatically?

Thanks a lot guys!

Modestas
Posted
Updated 11-Apr-13 1:48am
v3

1 solution

Use CustomDocumentProperties.Add method[^]

VB
Workbookobject.customdocumentproperties.add="" mode="hold"        LinkToContent:=False, Type:=msoPropertyTypeNumber, Value:=1000
 
Share this answer
 
v2

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