![]() |
|
#1
|
|||
|
|||
![]()
I am trying to figure out how to create a macro that will delete the selected text in a document.
My document is devided into three sections. I have bookmarked each section separatly and created a macro that will highlight each bookmark. How do i then delete the highlighted section using a bookmark. |
#2
|
||||
|
||||
![]()
You don't need to select/highlight the bookmarked text to work with it. Try something along the lines of:
Code:
Sub Demo() ActiveDocument.Bookmarks("BkMk").Range.Delete End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
![]()
Cross-posted (and answered) at: http://answers.microsoft.com/en-us/o...5-ee8b1104acc0
For cross-posting etiquette, please read: http://www.excelguru.ca/node/7
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
Mac Word - replace within selected text only. | bakerbj | Word | 0 | 10-31-2011 11:47 PM |
![]() |
Tracy | Word | 2 | 09-11-2011 07:25 AM |
Selected text and logo in one macro | marijke | Word VBA | 0 | 08-24-2009 07:01 AM |
Help with a macro to shade a selected pie chart | hzrvkt | Excel | 0 | 02-24-2006 01:25 PM |