Range.InsertCrossReference Method

Inserts a cross-reference to a heading, bookmark, footnote, or endnote, or to an item for which a caption label is defined (for example, an equation, figure, or table).

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)


Sub InsertCrossReference ( _
    ByRef ReferenceType As Object, _
    ReferenceKind As WdReferenceKind, _
    ByRef ReferenceItem As Object, _
    ByRef InsertAsHyperlink As Object, _
    ByRef IncludePosition As Object, _
    ByRef SeparateNumbers As Object, _
    ByRef SeparatorString As Object _
Dim instance As Range
Dim ReferenceType As Object
Dim ReferenceKind As WdReferenceKind
Dim ReferenceItem As Object
Dim InsertAsHyperlink As Object
Dim IncludePosition As Object
Dim SeparateNumbers As Object
Dim SeparatorString As Object

instance.InsertCrossReference(ReferenceType, _
    ReferenceKind, ReferenceItem, InsertAsHyperlink, _
    IncludePosition, SeparateNumbers, _
void InsertCrossReference(
    ref Object ReferenceType,
    WdReferenceKind ReferenceKind,
    ref Object ReferenceItem,
    ref Object InsertAsHyperlink,
    ref Object IncludePosition,
    ref Object SeparateNumbers,
    ref Object SeparatorString


  • ReferenceItem
    Type: System.Object%
    Required Object. If ReferenceType is wdRefTypeBookmark, this argument specifies a bookmark name. For all other ReferenceType values, this argument specifies the item number or name in the Reference type box in the Cross-reference dialog box. Use the GetCrossReferenceItems method to return a list of item names that can be used with this argument.
  • InsertAsHyperlink
    Type: System.Object%
    Optional Object. True to insert the cross-reference as a hyperlink to the referenced item.
  • IncludePosition
    Type: System.Object%
    Optional Object. True to insert "above" or "below," depending on the location of the reference item in relation to the cross-reference.
  • SeparateNumbers
    Type: System.Object%
    Optional Object. True to use a separator to separate the numbers from the associated text. (Use only if the ReferenceType parameter is set to wdRefTypeNumberedItem and the ReferenceKind parameter is set to wdNumberFullContext.)
  • SeparatorString
    Type: System.Object%
    Optional Object. Specifies the string to use as a separator if the SeparateNumbers parameter is set to True.


If you specify wdPageNumber for the value of ReferenceKind, you may need to repaginate the document in order to see the correct cross-reference information.

See Also


Range Interface

Range Members

Microsoft.Office.Interop.Word Namespace