How to remove the entire line of a word doc using vba -
the following line of code insert text bookmark range in word document.
objdoc.bookmarks("donoraddress").range.text = "6200 main st."
how remove entire line containing address bookmark if don't have address data?
by 'deleting line' believe mean 'delete paragraph'. if in way:
'2 steps delete- rather not recommended objdoc.bookmarks("donoraddress").range.paragraphs(1).range.select selection.delete
or in 1 step:
objdoc.bookmarks("donoraddress").range.paragraphs(1).range.delete
Comments
Post a Comment