VBA - Cross Referencing
InsertCrossReference
Inserts a cross-reference to a heading, numbered item, bookmark, footnote, or endnote
Can also be used to insert a cross-reference to an item that has a caption label (for example, an equation, figure, or table).
ReferenceType - The type of item for which a cross-reference is to be inserted.
Can be any wdReferenceType or wdCaptionLabelID constant or a user defined caption label.
ReferenceKind - The information to be included in the cross-reference.
If you specify wdPageNumber for the value of ReferenceKind, you may need to repaginate the document to see the correct cross-reference information.
ReferenceItem - 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 - (Optional) default is True to insert the cross-reference as a hyperlink.
IncludePosition - (Optional) default is True to insert "above" or "below," depending on the location of the reference item in relation to the cross-reference.
SeparateNumbers - (Optional) 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 - (Optional) Specifies the string to use as a separator if the SeparateNumbers parameter is set to True.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext