R
rodb_m
Hello,
I'm trying the following (OLE automation via Delphi, but I've tried the same
via VB and it gives the same result):
- opening a very large and complex MS Word document (+800 pages)
- jumping to the end of the document: selection.goto(wdGotoPage, wdGotoLast)
- jumping to the end of the page: selection.goto(wdGotoLine, wdGotoLast)
- start writing at the end of the document
Works OK for smaller documents but for large document there is a problem:
- opening the document: OK
- asking the total number of pages of the document using
selection.information[wdNumberOfPagesInDocument]: OK, e.g. 900
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: OK, is 1
- goto end of document using selection.goto(wdGotoPage, wdGotoLast)
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: OK, e.g. 900
- goto end of page using selection.goto(wdGotoPage, wdGotoLast)
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: NOK, e.g. 807
- start writing in the document: at page 807 instead of 900...
--> so it seems the jump to the end of the document doesn't work for large
document...
--> waiting a couple of seconds after the jump doesn't solve the problem
--> looping (jumping again when I see I'm not at the end) doens't solve the
problem
Anyone an idea?
thanks,
Ronny
I'm trying the following (OLE automation via Delphi, but I've tried the same
via VB and it gives the same result):
- opening a very large and complex MS Word document (+800 pages)
- jumping to the end of the document: selection.goto(wdGotoPage, wdGotoLast)
- jumping to the end of the page: selection.goto(wdGotoLine, wdGotoLast)
- start writing at the end of the document
Works OK for smaller documents but for large document there is a problem:
- opening the document: OK
- asking the total number of pages of the document using
selection.information[wdNumberOfPagesInDocument]: OK, e.g. 900
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: OK, is 1
- goto end of document using selection.goto(wdGotoPage, wdGotoLast)
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: OK, e.g. 900
- goto end of page using selection.goto(wdGotoPage, wdGotoLast)
- asking the current pagenumber using
selection.information[wdActiveEndPageNumber]: NOK, e.g. 807
- start writing in the document: at page 807 instead of 900...
--> so it seems the jump to the end of the document doesn't work for large
document...
--> waiting a couple of seconds after the jump doesn't solve the problem
--> looping (jumping again when I see I'm not at the end) doens't solve the
problem
Anyone an idea?
thanks,
Ronny