title: VBA Word - insert a cross reference to a bookmark, but keep the style of the context
body: <p>In Word I have a list of <em>Bookmarks</em> and want to insert cross references (copy the text and have a hyperlink) to those bookmarks. With macro recording and adjusting parameters I got this which replaces <code>myRange</code> with the text of <code>myBookmark</code> and makes a hyperlink to that bookmark:</p>
  
  <pre><code>myRange.InsertCrossReference _
      ReferenceType:=wdRefTypeBookmark, _
      ReferenceKind:=wdContentText, _
      ReferenceItem:=myBookmark, _
      InsertAsHyperlink:=True
  </code></pre>
  
  <p>This works fine except for one thing: if I change the style of the text I bookmarked (e.g. make it bold) and update the cross references then the cross references also adopt that style - I'd need to copy <em>only</em> the text in the bookmark, but the style (color, boldness, whatever) should remain the one from the context where the cross reference is (e.g. text should stay italic or blue or whatever).</p>
  
  <p>Changing the style of the cross reference manually isn't of much help - after updating the cross reference field, the style falls back to the one of the bookmark.</p>
  
  <p>I can't believe that there's no option for this, and I don't even see how to get that kind of bookmark/cross reference manually (without VBA). Any hints?</p>
  
  <p>Note: when I do a <code>ClearFormatting</code> to the range before I bookmark it (and set that style back afterwards), then cross references will keep their style even after updating the field (so far so good), unless (sic!) they don't have a style, then they will adopt the changed style of the bookmark - if the bookmark is in plain text, this isn't a problem, but if it is in - say - a table with italic words, I'll adopt this italic format for all cross references that don't have a style yet. So, what's a general solution?</p>