Word Automation Formatting problem in D5

I'm using automation to open a Word document - successfully.  I want to be able to highlight some text when the document is displayed.  I can succesfully find and replace the text I'm looking for, but I can't change the formatting.  Here's my code snippet.  (I've hard coded the text I'm looking for and the replacement text, just to ensure it's being found and replaced.  The behavior is that the document shows up and then changes 'blog' to 'FlapJack' -- but unformatted.  Why doesn't the text show violet, bold and with the marching red ants?

              WP.ActiveDocument.Content.Find.ClearFormatting;
              WP.ActiveDocument.Content.Find.Font.Bold := 1;
              WP.ActiveDocument.Content.Find.Replacement.ClearFormatting;
              WP.ActiveDocument.Content.Find.Replacement.Font.Bold := 1;
              WP.ActiveDocument.Content.Find.Replacement.Font.Color := wdViolet;
              WP.ActiveDocument.Content.Find.Replacement.Font.Animation := wdAnimationMarchingRedAnts;
              WP.ActiveDocument.Content.Find.Text := '*';
              sFindText := 'blog';
              bMatchCase := False;
              bMatchWholeWord := False;
              bMatchWildcards := True;
              bMatchSoundsLike := False;
              bMatchAllWordForms := False;
              bForward := True;
              bWrap := False;
              bFormat := True;
              sReplaceWith := 'FlapJack';
              wReplace := wdReplaceAll;
              bMatchKashida := False;
              bMatchDiacritics := False;
              bMatchAlefHamza := False;
              bMatchControl := False;
             
              WP.ActiveDocument.Content.Find.Execute(sFindText, bMatchCase, bMatchWholeWord, bMatchWildcards, bMatchSoundsLike,
                    bMatchAllWordForms, bForward, bWrap, bFormat, sReplaceWith, wReplace, bMatchKashida, bMatchDiacritics,
                    bMatchAlefHamza, bMatchControl);

bjones8888PresidentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bjones8888PresidentAuthor Commented:
... by the way - only the first instance of 'blog' gets changed in my document.  Any ideas why it's not changing all of them?  (I have 3 instances that I expected to change, but only the first one did.)
carcotasuCommented:
try to use a officepartner component, have demo apllication and it's free/
bjones8888PresidentAuthor Commented:
I'm sorry -- I don't understand.  What do you mean by "officepartner component"?  Are you saying you have a demo application of such a thing?  If so, I'd like to see it.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

carcotasuCommented:
I don't have demo, component OfficePartner having demo, try google search.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bjones8888PresidentAuthor Commented:
Thanks, Carcotasu.  I've downloaded the OfficePartner components and they may do the trick.  I'm giving you the points, as no one else has responded, and hopefully these will do what I need.  Another solution which I was told about may also do the task: calling a Word template which does the formatting I need (based on passed in parameters).

Thanks.
carcotasuCommented:
If you search a components for Word template based on passed in parameters try http://ekrtf.code.net.ru/ , this component know much more and work very fast. template must RTF format but result = *.DOC.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.