The problem is, I can't get the app to send the cursor to a specific
bookmark set in the document.
There are several Bookmarks in the doc template. Once the cursor gets to
that position I can Insert text. Or if I can get a bookmark range variant
object, I can use it's InsertAfter method.
Here is the code we currently have:
Variant MSApp;
MSApp = Variant::CreateObject("word.Application");
MSApp.OlePropertySet("Visible",true);
Variant MSWord_Disclosure = Variant::CreateObject("word.basic");
String s_template = "\"C:\\docs\\Disclosure2.dot\"";
MSWord_Disclosure.OleProcedure("FileNew", s_template, 0);
// Need to go to existing bookmark called "FirmCode"
// Then insert text there..
MSWord_Disclosure.OleProcedure("Insert", "Firm Code Goes Here.");
Or We could somehow create a new Variant containing a bookmark range.
and then:
// need to ceate a bookmark object containing the "FirmCode" bookmark.
(MSBookMark)
// Then Insert text there...
MSBookmark.OleProcedure("InsertAfter", "Firm Code Goes Here.");
Any help filling this gap for us much appreciated.
Thanks in advance,
David