The property of PageCount does not get updated in the word document. We initialize the document using a template and then populate the document with the data. The resulting document is almost always greater in the size than the template but the value of PageCount property does not update itself for the document. We cannot set it and there is no way to force an update to this count or get an actual count. This impacts our ability to place electronic signatures in the document at the proper place which hampers our sales efforts. Need a fix asap.
//Creates an empty WordDocument instance
WordDocument document = new WordDocument();
//opens an existing word document through Open method of WordDocument class
//To-Do some manipulation
//Updates the page count, if perform layout sets to true.
//Gets the updated page count value.
int count = document.BuiltinDocumentProperties.PageCount;
//Saves the document in file system
//Closes the document