![]() |
|
#2
|
||||
|
||||
|
Hi chipnputt,
This isn't as straightforward as one might expect. Try something along the lines of: Code:
Sub UpdateBookMark()
Dim BmkNm As String, NewTxt As String, BmkRng As Range
BmkNm = InputBox("Bookmark Name")
NewTxt = InputBox("New Bookmark Text")
With ActiveDocument
If .Bookmarks.Exists(BmkNm) Then
Set BmkRng = .Bookmarks(BmkNm).Range
BmkRng.Text = NewTxt
.Bookmarks.Add BmkNm, BmkRng
Else
MsgBox "Bookmark: " & BmkNm & " not found."
End If
End With
Set BmkRng = Nothing
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA to insert Bookmark
|
rockwellsba | Word VBA | 2 | 05-31-2011 01:07 AM |
| Help with PPT AddIn that pastes slides into another presentation | matt.wilson | PowerPoint | 0 | 01-05-2011 03:28 PM |
| Controlling Style when a user pastes into a form | Cris0205 | Word | 0 | 08-05-2010 04:33 PM |
Can you stop multiple calendars from fading?
|
JohnGalt | Outlook | 2 | 08-05-2010 09:06 AM |
| Word only pastes plain text | seskanda | Word | 6 | 02-19-2010 10:01 AM |