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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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