troubleshooting Question

MS word and Delphi

Avatar of Programm
Programm asked on
DelphiMicrosoft Word
3 Comments1 Solution2102 ViewsLast Modified:
I am trying to delete line from MS word document from delphi program.

I can delete or remove bookmarks from the document but the line is still there.
How can I delete the line?


Here is my code.
Can I add some params to delete current line where my bookmark is?

      OleObj.application.Selection.Find.ClearFormatting;
      OleObj.application.Selection.Find.Text := strFinna;
      OleObj.application.Selection.Find.MatchCase := False;
      OleObj.application.Selection.Find.MatchWholeWord := False;
      OleObj.application.Selection.Find.MatchWildcards := False;
      OleObj.application.Selection.Find.MatchSoundsLike := False;
      OleObj.application.Selection.Find.MatchAllWordForms := False;
      OleObj.application.Selection.Find.Forward := True;
      OleObj.application.Selection.Find.Wrap := wdFindContinue;
      OleObj.application.Selection.Find.Format := True;
      OleObj.application.Selection.Find.Replacement.ClearFormatting;
      OleObj.application.Selection.Find.Replacement.Text := strResponse;
      OleObj.application.Selection.Find.Execute(Replace := wdReplaceAll);
ASKER CERTIFIED SOLUTION
Ferruccio Accalai
Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros