Hi!
I've got a code (which works fine) for piloting word with C++ Builder. It's useful for reaching different bookmarks in the document.
Variant vNom, vWDocuments, vWDocument, vMSWord, vSignets, vSignet;
vNom = WideString("blabla.doc");
try
{
vMSWord = Variant::GetActiveObject("Word.Application");
}
catch(...)
{
vMSWord = Variant::CreateObject("Word.Application");
}
vMSWord.OlePropertySet("Visible", true);
vWDocuments = vMSWord.OlePropertyGet("Documents");
vWDocument = vWDocuments.OleFunction("Open", vNom);
vSignets = vWDocument.OlePropertyGet("BookMarks");
if (vSignets.OleFunction("Exists", signet))
{
vSignet = vSignets.OleFunction("Item", signet);
vSignet.OleFunction("Select");
}
But once the document is opened, the user can no longer see when an other bookmark has been reached, since the application stays in background.
Does anyone know how i can do to make Word displayed in the foreground, or to light-up the document in the taskbar?
Thanks!