Demote

Applies to: SharePoint Foundation 2010

Reads the document properties that are contained in the specified property bag and writes those properties into the specified document.

HRESULT Demote(
   ILockBytes *pilb,
   IParserPropertyBag *pibag,
   VARIANT_BOOL *pfChanged
);

Parameters

pilb

[in] The document into which the document properties are to be written.

pilbag

[in] The property bag object from which the parser reads the document properties.

pfChanged

[out] Whether the parser has changed the document. True if the parser has changed the document, False if it has not.

Return Value

The parser methods return typical HRESULT values. In general, the parser should return a positive OK value when successful or a negative FAIL value when unsuccessful.

Remarks

Microsoft SharePoint Foundation can invoke the parser to demote properties or write a column value into the matching property in the document itself. When SharePoint Foundation 2010 invokes this method, it passes the document and a property bag object to the parser. In this case, the property bag object contains the properties that SharePoint Foundation expects the parser to demote into the document.

If the parser alters the document, as specified by the pfChanged argument, SharePoint Foundation uploads the updated document to the document library.

For more information, see Document Property Promotion and Demotion.

See Also

Concepts

Custom Document Parsers

Document Property Promotion and Demotion

Document Parser Interface Overview