Hello,
My macro consist in looking for all commments in a document and getting
the page number.
I use somethong like this:
...
for each com in theDocument.Comments
number = com.Scope.Information(wdActiveEndPageNumber)
...
next
My problem is that each time Information is called it cause the document
to be repaginated which takes a long (wast of ) time.
How can I prevent this?
(it should be possible to just repaginate one time)
JB
Thanks
Leigh - 04 Feb 2005 12:31 GMT
The Range.Information() function always causes a repagination, as far
as I know. One way you could solve this would be to walk through the
document and note the Range.Begin value at the start of each page. You
could then compare the comments range.begin with these values to decide
which page the comment is on.
Jean-Baptiste - 09 Feb 2005 15:25 GMT
> The Range.Information() function always causes a repagination, as far
> as I know. One way you could solve this would be to walk through the
> document and note the Range.Begin value at the start of each page. You
> could then compare the comments range.begin with these values to decide
> which page the comment is on.
How do you note the Range.Begin value at the start of each page?
How do you detect the start of a page?
The page number doesn't depend only on the document but it depends on
the printer properties too, this is why you need at least a repagination.
Dave Lett - 04 Feb 2005 14:00 GMT
Hi JB,
I _think_ you can turn off screenupdating to prevent Word from repaginating
each time.
Application.ScreenUpdating = False
'''insert your code
Application.ScreenUpdating = True
HTH,
Dave
> Hello,
>
[quoted text clipped - 18 lines]
>
> Thanks