I am trying to build a macro that counts the number of cross references in a Word document by cross ref type:
as well as by the other types without wd enumeration (‘Figure’, ‘Equation’, and ‘Table’).
I came up with ‘Count_Crossrefs_by_Label’
(in the attached) for counting the ‘Figure’, ‘Equation’, and ‘Table’ types because of their standardized text, but am at a loss as to how to count the others. The ‘GetCrossReferenceItems’ method seems to count all of the entities, not whether they have cross references or not.
It seems that if I can get the above wd types into a loop that also loop through the wdFieldRef types, through would give me a count by cross ref type. But I’m not having any success in doing this. Does someone know how to make this work?