M
Mic
Hi, does anyone know sth. about erros at Selection.MoveRight command?
I'm having a lot of trouble at an automatic function creating a Word
Document. VBA code runs for several hours (>5h) creating about 500 Documents,
each 1 to 50 pages containing a table layout (7 columns) and about 3 to 30
rows per page. Some table cells contain images (rather small, about 2x3'').
The error means Word is not doing a good job at creating a 2000 pages
pricelist every week. This is "Enterprise cristical" if documents would not
be re-viewed page by page.
The code is started from a MS Access Database (using a Word.Application with
GetObject("Word.Application") and so on...). All components are Office2003.
Language: German (should not cause trouble anyway).
Error: Error.Number: 2147417851, Error.Description: Method _MoveRight_
failed for object _Selection_
Error occurs at VBA command:
Word.Application.Selection.MoveRight Unit:=wdCell
Definately the selection mark is in the table at a cell when the error occurs.
It seems the Word.Application instance does not work properly after having
run some time. Errors do not occur at the same place at the same document,
but tend to strike long documents (>30 pages) more likely, when simple text
entries (by Selection.TypeText) need 10 times as long as they do in short
documents.
Hints and imagination about pagination have failed up to now, errors do not
only occur when moving right at the bottom of a page. The Word process
(TaskManager) looks ok, is not using more memory than normal. Everything
about the errors looks like being arbitrary.
Does anyone know something like a known bug about MoveRight? Is there a
workaround at least beeing able to minimize or limit errors? Could I do
anything not to get a 1% drop out rate?
Thanks a lot.
I'm having a lot of trouble at an automatic function creating a Word
Document. VBA code runs for several hours (>5h) creating about 500 Documents,
each 1 to 50 pages containing a table layout (7 columns) and about 3 to 30
rows per page. Some table cells contain images (rather small, about 2x3'').
The error means Word is not doing a good job at creating a 2000 pages
pricelist every week. This is "Enterprise cristical" if documents would not
be re-viewed page by page.
The code is started from a MS Access Database (using a Word.Application with
GetObject("Word.Application") and so on...). All components are Office2003.
Language: German (should not cause trouble anyway).
Error: Error.Number: 2147417851, Error.Description: Method _MoveRight_
failed for object _Selection_
Error occurs at VBA command:
Word.Application.Selection.MoveRight Unit:=wdCell
Definately the selection mark is in the table at a cell when the error occurs.
It seems the Word.Application instance does not work properly after having
run some time. Errors do not occur at the same place at the same document,
but tend to strike long documents (>30 pages) more likely, when simple text
entries (by Selection.TypeText) need 10 times as long as they do in short
documents.
Hints and imagination about pagination have failed up to now, errors do not
only occur when moving right at the bottom of a page. The Word process
(TaskManager) looks ok, is not using more memory than normal. Everything
about the errors looks like being arbitrary.
Does anyone know something like a known bug about MoveRight? Is there a
workaround at least beeing able to minimize or limit errors? Could I do
anything not to get a 1% drop out rate?
Thanks a lot.