I
Ivo Wubbels
In an existing application that communicates with Word 8 using automation I
need to make some updates; I'm having trouble to get the Extend member of
the Selection object working. The msword8.h generated file is added to my
workspace. The curSelection is a valid pointer to a Selection object.
bool AutExtendSelection(char *Text,char *szSelected)
{
curSelection->Extend(COleVariant(Text));
curSelection->Select();
CString result=curSelection->GetText();
strcpy(szSelected,result.operator LPCTSTR());
return true;
}
The idea is simple: I scan the word document for a text (works), then
trying to extend the selection (to an end marker), at the end I want to
replace the entire selection with a new text
Anybody a solution here????
Ivo
need to make some updates; I'm having trouble to get the Extend member of
the Selection object working. The msword8.h generated file is added to my
workspace. The curSelection is a valid pointer to a Selection object.
bool AutExtendSelection(char *Text,char *szSelected)
{
curSelection->Extend(COleVariant(Text));
curSelection->Select();
CString result=curSelection->GetText();
strcpy(szSelected,result.operator LPCTSTR());
return true;
}
The idea is simple: I scan the word document for a text (works), then
trying to extend the selection (to an end marker), at the end I want to
replace the entire selection with a new text
Anybody a solution here????
Ivo