T
Thomas Noone
Hi!
I'm trying to find and replace text in Word using automation.
My current routine doesn't work with textboxes.
Has anybody solved this problem using VC++?
I've been wasting hours trying to figure out, how to convert the simple VB
code to VC++ - thanks to the great documentation.
Any help (or better example) is greatly appreciated!
Thanks,
Thomas
Range rngDoc;
rngDoc = oDoc.GetContent();
Find fn = rngDoc.GetFind();
COleVariant vt1, vt2, vtUnit, vtExtend;
vt1 = strReplace;
vt2 = strReplaceWith;
// Replace
while(fn.Execute(vt1,
vtTrue,
vtTrue,
vtFalse,
vtFalse,
vtFalse,
vtTrue,
vtTrue,
vtOptional,
vt2,
vtFindContinue))
{
}
I'm trying to find and replace text in Word using automation.
My current routine doesn't work with textboxes.
Has anybody solved this problem using VC++?
I've been wasting hours trying to figure out, how to convert the simple VB
code to VC++ - thanks to the great documentation.
Any help (or better example) is greatly appreciated!
Thanks,
Thomas
Range rngDoc;
rngDoc = oDoc.GetContent();
Find fn = rngDoc.GetFind();
COleVariant vt1, vt2, vtUnit, vtExtend;
vt1 = strReplace;
vt2 = strReplaceWith;
// Replace
while(fn.Execute(vt1,
vtTrue,
vtTrue,
vtFalse,
vtFalse,
vtFalse,
vtTrue,
vtTrue,
vtOptional,
vt2,
vtFindContinue))
{
}