View Single Post
 
Old 03-16-2015, 02:24 AM
NobodysPerfect NobodysPerfect is offline Windows 8 Office 2010 32bit
Competent Performer
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

Hi,

Thanks for your answer.

Meanwhile I also tried:

Code:
Sub GetCrossReferences()
Dim oDoc As Document: Set oDoc = ActiveDocument
Dim myRefs As Variant, i As Long
   
    myRefs = oDoc.GetCrossReferenceItems(wdRefTypeHeading)
    For I = 1 To UBound(myRefs)
        With Selection.Find
            .Text = Trim$(myRefs(i))
            .Forward = True
        End With
        Selection.Find.Execute
        MsgBox myRefs(i) & " auf Seite:" & Selection.Information(wdActiveEndPageNumber), vbOKOnly
    Next
   
End Sub
Cheers
NP
Reply With Quote