![]() |
|
|
|
#1
|
|||
|
|||
|
Thank you for you suggestion . I have changed the code to add bookmarks into range instead of document. To keep it simple, I don't want to add the function inserting reference to heading outline number right now. Thank you again .Code:
Dim oldbm As Bookmark
Dim bmi As Bookmark
Dim bmShowHiddenOld As Boolean
bmShowHiddenOld = rg.Bookmarks.ShowHidden
'search for existing bookmark reference the same range
rg.Bookmarks.ShowHidden = True
For Each bmi In rg.Bookmarks
If bmi.Range.IsEqual(rg) And bmi.Name Like BookmarkPrefix & "#*" Then
Set oldbm = bmi
Exit For
End If
Next bmi
rg.Bookmarks.ShowHidden = bmShowHiddenOld
|
|
| Tags |
| cross reference |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Direct (copy-paste) reference from another paragraph (CITATION)
|
WordNoobx | Word | 6 | 05-15-2018 05:46 AM |
insert cross-reference – why is a level 2 style not a heading?
|
eNGiNe | Word | 8 | 01-30-2018 06:00 AM |
Find {text} and insert cross reference from bookmark
|
Slamzor | Word VBA | 1 | 12-01-2017 05:12 PM |
Insert a cross-reference in a caption
|
RomFigo | Word | 9 | 09-25-2015 12:32 AM |
| Can you copy & paste cells across worksheets and preserve reference to worksheet? | New Daddy | Excel | 2 | 11-27-2013 07:19 AM |