It seems that it cannot go to > 32767 lines.
>I have a Word document over 1300 pages (> 70000 lines).
> When I use Visual Basic code
[quoted text clipped - 6 lines]
>
> Thank you so much.
> > Selection.GoTo What:=wdGoToLine, Which:=wdGoToLast
> [...]
> It seems that it cannot go to > 32767 lines.
Hi Wilson,
I see this, too. You can use
Selection.EndKey Unit:=wdStory
or
Selection.Start=ActiveDocument.Content.End
or something like that as a work-around.
Most other "targets" for GoTo are limited to less that 2^15 anyway (max
16.379 bookmarks, 32.000 fields).
The VBA help says that Word uses a variant for the count, but probably it
really uses a signed integer (limited to +/- 32767) somewhere along the
way...
Regards,
Klaus
wilson - 04 Nov 2004 02:33 GMT
Agree. Seems many things relate to the magic number 32767.
Thanks for the work-arounds.
>> > Selection.GoTo What:=wdGoToLine, Which:=wdGoToLast
>> [...]
[quoted text clipped - 16 lines]
> Regards,
> Klaus