//Creates an empty WordDocument instance
WordDocument document = new WordDocument();
//opens an existing word document through Open method of WordDocument class
document.Open(fileName);
//To-Do some manipulation //Updates the Paragraphs count, Word count, Character count, and Page count. document.UpdateWordCount(true);
//Gets the updated page count value.
int count = document.BuiltinDocumentProperties.PageCount;
//Saves the document in file system
document.Save(outputFileName, FormatType.Docx); |