Home > Back-end >  BCB how through OLE modify the text box in the word strings
BCB how through OLE modify the text box in the word strings

Time:10-16

Hello
Due to overprint the testimonials
Need to run out in BCB programming testimonials content
Register to the print on the certificate template

OLE information especially c + + is bad on the Internet looking for
To seek to find only the (stick to replace part of string off gear on gear test is OK)

But in the actual execution results only to the sample & lt; Unit & gt; Do replace
If & lt; Unit & gt; Is playing in the text box can't search for
Other OLE control text box on the Internet information is a new text box cannot meet I must beg
Could you tell me whether have OLE ace can guide? Thank you

The Variant WordSel=word. OlePropertyGet (" Selection ");
WholeStory WordSel. OleFunction (" ");
The Variant Replacement, WordFind;
WordFind=WordSel. OlePropertyGet (" Find ");
ClearFormatting WordFind. OleFunction (" ");
WordFind. OlePropertySet (" MatchCase ", false);
WordFind. OlePropertySet (" MatchWholeWord ", true);
WordFind. OlePropertySet (" Text ", "& lt; Unit & gt;" );
WordFind. OlePropertySet (" Wrap ", 1);
WordFind. OlePropertySet (" Forward ", true);
WordFind. OlePropertySet (" Format ", false);
WordFind. OlePropertySet (" MatchByte ", true);
WordFind. OlePropertySet (" MatchWildcards ", false);
WordFind. OlePropertySet (" MatchSoundsLike ", false);
WordFind. OlePropertySet (" MatchAllWordForms ", false);
WordFind. OlePropertySet (" MatchWildcards ", false);
WordFind. OlePropertySet (" MatchAllWordForms ", false);
Replacement=WordFind. OlePropertyGet (" Replacement ");
Replacement. OlePropertySet (" Text ", "");

The Variant vValue=https://bbs.csdn.net/topics/WordFind.OleFunction (" Execute ");
While (vValue=https://bbs.csdn.net/topics/=Variant (true))
{
WordSel. OleFunction (" TypeText ", "XX high school");
vValue=https://bbs.csdn.net/topics/WordFind.OleFunction (" Execute ");
}
  • Related