Discussion:
Pagination event
(too old to reply)
Stuart Carnie
2005-03-17 06:07:01 UTC
Permalink
Hello,

Question:
Is there an event or a status I can use in my C# Word add-in to
determine when Microsoft Word has finished paginating a document?



- - - - - - - - -

Background:
I've written a Microsoft Word add-in in C# that dynamically generates a
document based on an XML file. Once it has completed adding all the
text and tables, the document takes an arbitrary amount of to
repaginate. Different times for different speed machines.
After this completes, I would like to able to execute some code to
update the fields / cross references. I was looking for an event that
Word would raise or a status I could poll, but I cannot find anything.

Cheers,

Stuart
Stuart Carnie
2005-03-17 14:22:51 UTC
Permalink
Post by Stuart Carnie
Hello,
Is there an event or a status I can use in my C# Word add-in to
determine when Microsoft Word has finished paginating a document?
- - - - - - - - -
I've written a Microsoft Word add-in in C# that dynamically generates a
document based on an XML file. Once it has completed adding all the
text and tables, the document takes an arbitrary amount of to
repaginate. Different times for different speed machines.
After this completes, I would like to able to execute some code to
update the fields / cross references. I was looking for an event that
Word would raise or a status I could poll, but I cannot find anything.
Cheers,
Stuart
I tried executing the Repaginate method on the Document object, and this
waits while it paginates. However, even after it finishes, Word still
background paginates for a few more seconds to arrive at the final
repaginated document.

I even tried calling Repaginate twice, but the second call immediately
returns, and Word continues to finalise pagination in the background.

Cheers,

Stuart

Loading...