Export (0) Print
Expand All
Expand Minimize

Document.GetCrossReferenceItems Method

Gets an array of items that can be cross-referenced based on the specified cross-reference type.

Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)

public virtual Object GetCrossReferenceItems (
	ref Object ReferenceType
)

Parameters

ReferenceType

One of the WdReferenceType values that specifies the type of item you want to insert a cross-reference to.

Return Value

An array of items that can be cross-referenced based on the specified cross-reference type.

The array corresponds to the items listed in the For which box in the Cross-reference dialog box.

An item returned by this method can be used as the ReferenceWhich argument for the InsertCrossReference method.

The following code example uses the GetCrossReferenceItems method to get an array of headings that can be cross-referenced.

private void DocumentGetCrossReferenceItems()
{
    object referenceType = Word.WdReferenceType.wdRefTypeHeading;
    this.GetCrossReferenceItems(ref referenceType);
}

Show:
© 2014 Microsoft