K
kosmodisk
Hi,
I have created a small application in VBA, that compiles reports -
creates one main document, puts in another docs using "insert word
file", then goes to header, types some text into header, etc etc.
What I'm having here is that on some, and I stress the word "some",
cases - header contains 1x3 cells table, and I need to type stuff into
the 3rd cell - goddamn Word just does not cooperate. So, here is what
I'm doing:
with docReport.ActiveWindow
' go to header
.ActivePane.View.SeekView = wdSeekCurrentPageHeader
' select cell number 1,3
.Selection.Tables(1).Cell(1, 3).Range.Select
'---sinp
end with
On compiling, when report has gained more than n pages, the fun begins.
Cursor just does not go into that cell, it stays at the cell 1,1. I
note that if I break the execution, and do it step-by-step, everything
works fine
) Also, doing the same thing on another computer, same
Word version and everything, also it works.
So, I have reached no other conclusion than this must be computer speed
problem. Switching to header, the cursor somehow does not manage to
follow the execution of macro, or something.
For a while, if I did select cell for 4 times, it worked
) Now, even
that does not work. I don't know what to do. Increase to 40 times?
)
Delay the execution (haven't tried it yet, but knowing VBA I dont think
it will help)? Has anybody ever experienced same problem?
Sven
I have created a small application in VBA, that compiles reports -
creates one main document, puts in another docs using "insert word
file", then goes to header, types some text into header, etc etc.
What I'm having here is that on some, and I stress the word "some",
cases - header contains 1x3 cells table, and I need to type stuff into
the 3rd cell - goddamn Word just does not cooperate. So, here is what
I'm doing:
with docReport.ActiveWindow
' go to header
.ActivePane.View.SeekView = wdSeekCurrentPageHeader
' select cell number 1,3
.Selection.Tables(1).Cell(1, 3).Range.Select
'---sinp
end with
On compiling, when report has gained more than n pages, the fun begins.
Cursor just does not go into that cell, it stays at the cell 1,1. I
note that if I break the execution, and do it step-by-step, everything
works fine
Word version and everything, also it works.
So, I have reached no other conclusion than this must be computer speed
problem. Switching to header, the cursor somehow does not manage to
follow the execution of macro, or something.
For a while, if I did select cell for 4 times, it worked
that does not work. I don't know what to do. Increase to 40 times?
Delay the execution (haven't tried it yet, but knowing VBA I dont think
it will help)? Has anybody ever experienced same problem?
Sven