|
|
От: |
Elena_
|
|
| Дата: | 20.05.05 22:03 | ||
| Оценка: | |||
SYMPTOMS
When you use a macro to insert page breaks in a document and then return a page count by using the BuiltInDocumentProperties property, the number of pages returned may be incorrect.
CAUSE
The document needs to be repaginated before you return the number of pages.
To work around this problem, use the Repaginate method to force document repagination before calling the BuiltInDocumentProperties(wdPropertyPages) property. For example:
Sub GetNumberOfPages() ActiveDocument.Repaginate MsgBox ActiveDocument.BuiltInDocumentProperties(wdPropertyPages) End Sub