E
Eryk
Hello all,
I'm currently developing an application that uses Word 2003. The goal is
to move through each page in a document and add page specific information. I
use loop with:
Dim workPageRegion As Word.Range =
document.Range.GoTo(What:=Word.WdGoToItem.wdGoToPage,
Which:=Word.WdGoToDirection.wdGoToAbsolute, Count:=pageNumber)
workPageRegion.Select()
and add textbox with some info. Its ok with few pages but when the document
is arround 500-1000 pages at some (random) page I get errror code -2147418111
(app bussy so for my non profi eye looks like word is so busy with
previous opperations that it does not want any more.
When I used the same code in VBA it works great, and whats more its 2x
faster.
so my question is, how can i ensure that my code will work, and how can i do
it fast ?
I use VB.NET (app that creates its own word instance and tells word what to
do )
Thanks in advance for any help
I'm currently developing an application that uses Word 2003. The goal is
to move through each page in a document and add page specific information. I
use loop with:
Dim workPageRegion As Word.Range =
document.Range.GoTo(What:=Word.WdGoToItem.wdGoToPage,
Which:=Word.WdGoToDirection.wdGoToAbsolute, Count:=pageNumber)
workPageRegion.Select()
and add textbox with some info. Its ok with few pages but when the document
is arround 500-1000 pages at some (random) page I get errror code -2147418111
(app bussy so for my non profi eye looks like word is so busy with
previous opperations that it does not want any more.
When I used the same code in VBA it works great, and whats more its 2x
faster.
so my question is, how can i ensure that my code will work, and how can i do
it fast ?
I use VB.NET (app that creates its own word instance and tells word what to
do )
Thanks in advance for any help