Hi, my problems: (MS Word 2003, CVI 8.0.1)
1]
I open the existing sample.doc file (as template), which contains 4 bookmarks:
caErrChk ( WordRpt_ApplicationNew (1, &appHandle));
caErrChk ( WordRpt_DocumentOpen (appHandle,"c:\\sample.doc",&docHandle));
this is all ok, but then I want to jump to the first bookmark and start writing :
caErrChk (WordRpt_GoToBookmark (docHandle,"description"));
for (n=0;n<=40;n++) { caErrChk (WordRpt_AppendLine (docHandle, "Description")); } // only for testing, writes 40 lines - fill out one column
and after this, CVI opens the Word, then loads sample.doc and that's all, no jump to the bookmark.
If I add before GoToBookmark fnc this: caErrChk ( WordRpt_AppendLine (docHandle, "AA"));
then GoTo fnc is working well. (but in the final saved document the string "AA" is NOT written !)
2]
Original sample.doc (one empty table and one company stamp in the right bottom corner there) has only one page. If I fill out the table and save the document, it has 3 pages (the first is epmty, on the second one is my corectly filled table and the third is also empty). Sometimes also Word saves the document with some chaotic strings, but only in minor case.
So pls, is here some compatibility problem (Word2000.fp vs Word 2003) or am I doing something wrong in the opening sequence ?
( All these function are starting up from TestStand - Tools/Sequence File Documentation (I am modifyind the docgen.dll) )
Thanks
PetrM - Czech. rep.