UpdateDocumentStatistics

WordProcessingRootPackage.UpdateDocumentStatistics method

Recalculates count of pages, paragraphs, words, lines, characters in the document and updates appropriate metadata packages.

public void UpdateDocumentStatistics()

Remarks

Learn more

Examples

This code sample demonstrates how to update document statistics for a WordProcessing document.

using (Metadata metadata = new Metadata(Constants.InputDoc))
{
   var root = metadata.GetRootPackage<WordProcessingRootPackage>();

   root.UpdateDocumentStatistics();

   metadata.Save(Constants.OutputDoc);
}

See Also