PROPPATCH Sample Code

In this example, we will see how we can create and set the properties of a Word document using the PROPPATCH method.

The name of the document is promotoc4.doc, and it is located in the /DOCUMENT/MARKETING/APRIL/ folder.

We want to change the DAV:owner property and create new properties such as Author, Company, and Title. The last three properties are the properties of an MS Word document, so we should refer to the URN as xmlns:o='urn:schemas-microsoft-com:office:office' and use the o: prefix in front of these properties to identify them correctly.

The strURL variable needs to point to the resource as

strURL = "http://" + strServer + "/" + strWorkspace + "/DOCUMENTS/MARKETING/APRIL
/promotoc4.doc" 

The XML string needs to ...

Get Special Edition Using Microsoft® SharePoint Portal Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.