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

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -