Document.GetCrossReferenceItems Method
Word Developer Reference |
Returns an array of items that can be cross-referenced based on the specified cross-reference type.
Syntax
expression.GetCrossReferenceItems(ReferenceType)
expression An expression that represents a Document object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ReferenceType | Required | Variant | The type of item you want to insert a cross-reference to. Can be any WdReferenceType constant. |
Remarks
The array that this method returns corresponds to the items listed in the For which box in the Cross-reference dialog box. The value returned by this method can be used as the value of the ReferenceWhich argument for the InsertCrossReference method of the Range or Selection object.
Example
This example displays the name of the first bookmark in the active document that can be cross-referenced.
Visual Basic for Applications |
---|
|
This example uses the GetCrossReferenceItems method to retrieve a list of headings that can be cross-referenced and then inserts a cross-reference to the page that includes the heading "Introduction."
Visual Basic for Applications |
---|
|
See Also