![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
I assume you're trying to populate the bookmarked range. In that case, instead of:
Code:
With objWord ... End With Code:
With objDoc Dim wdRng As objWord.Range, StrBkMkNm As String StrBkMkNm = "MySpots" Set wdRng = .Bookmarks("MySpots").Range 'Insert header (bookmark MySpot is in Header, Bookmark Myspots is in table in header, Bookmark MyReference is in normal text) .Fields.Add Range:=.Bookmarks(StrBkMkNm).Range, Type:=wdFieldEmpty, Text:="REF MyReference \*Charformat", PreserveFormatting:=False .Bookmarks.Add Range:=wdRng, Name:=StrBkMkNm End With Note also that there is no need to 'seek' the header or to select anything.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Amapola188 | Word VBA | 3 | 07-12-2012 05:16 PM |
Excel Pivot Table Calculated Field | BertLady | Excel | 0 | 05-21-2012 10:51 AM |
Late Binding on SHDocVw | tinfanide | Excel Programming | 1 | 05-19-2012 10:00 PM |
![]() |
b0x4it | Word VBA | 4 | 05-26-2011 01:14 AM |
![]() |
b0x4it | Word VBA | 11 | 05-19-2011 11:15 PM |