delete a line in word from VB.net
Revision 2
Hi, i'm looking for a function to delete one line from a word document. I want to do this from VB.net.
I tried:
Do While WordDoc.Content.Find.Execute(FindText:="%NP6%", Wrap:=Word.WdFindWrap.wdFindContinue) = True
WordApp.Selection.Range.Bookmarks("\line").Range.Delete()
Loop
Instead of deleting one row it deletes the complete first part of the document, including the line with %NP6%.
Anyone an idea, Thanks, Rob
Posted 1-Jan-13 10:13am
by
RobertRos.