Method SetExtendedProperties
SetExtendedProperties(WordDocument, DocumentPosition, Action<DocumentExtendedProperties>)
Changes the document's extended properties as one undoable edit. A property set to null is removed from the part, one set to an empty string is written empty; everything else in the part stays. A document without the part gets one. No paragraph changes: the layout is not affected.
public static DocumentEdit SetExtendedProperties(this WordDocument document, DocumentPosition at, Action<DocumentExtendedProperties> change)
Parameters
documentWordDocumentThe document.
atDocumentPositionA position in the document (where the edit's caret stays).
changeAction<DocumentExtendedProperties>Changes the properties as they are now.
Returns
- DocumentEdit
The edit (empty when nothing changed).
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
atis not indocument, or a value holds a character XML cannot carry.