

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. Select the heading you want to refer to in the list below, then click Insert.

Notes: The Ctrl + R prefix replaces Word. On the Ribbon, go to the References Under the Captions group on the middle, click the Cross-reference In the window that appears, change Reference type to Heading and Insert reference to to Page number. A standard Word cross-reference is inserted. Type the caption number for the table or figure desired and press enter. ReferenceKind:=wdPageNumber, ReferenceItem:=i Ctrl + R, F: insert a figure reference Ctrl + R, T: insert a table reference Ctrl + R, E: insert an equation reference In each case, a prompt appears for the figure or table number. If Instr(LCase$(myHeadings(i)), "introduction") Then In the Insert reference to box, click the information you want inserted in the document. 2) Other cross-references already in the file works. If I delete anyone of them, the rest get updated as expected. When I try to add a cross-reference I get an empty list like this: I made sure that: 1) The figures and tables are actually captions. The list of what's available depends on the type of item (heading, page number, etc.) you're linking to. I have been given a Word file (.docx) that has about 35 figures and tables. In the Reference type box, click the drop-down list to pick what you want to link to. Be sure that you have the items you want to reference already in place so that they display in the Cross-Reference setup window. You may have a document where you want to reference a section with a header, a figure on another page, or a footnote containing extra details. 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." myHeadings = _ĪctiveDocument.GetCrossReferenceItems(wdRefTypeHeading) On the Insert tab, click Cross-reference. Set a Cross-Reference to a Table or Other Object in Word. MyBookmarks = ActiveDocument.GetCrossReferenceItems( _ (This list of instructions here is an example of such a list.) This will ensure that each item in the list of references has a number that Word can recognize, and it also ensures that if you add or delete an item from the reference list, the numbers in the reference list will change automatically. This example displays the name of the first bookmark in the active document that can be cross-referenced. Word that allows you to create a numbered list. 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. The array that this method returns corresponds to the items listed in the For which box in the Cross-reference dialog box. The type of item you want to insert a cross-reference to. GetCrossReferenceItems( _ReferenceType_ )Įxpression An expression that represents a Document object. Returns an array of items that can be cross-referenced based on the specified cross-reference type.
