Hello,
I have a problem with my word VSTO add-in. I wrote the code with Visual Studio 2013 and Word 2013. Now I am using VS 15 and Office 2016. My add-in showed all references and caption labels in the word document. In Word 2016 I do not get any entries for custom
caption labels, as the German "Abbildung" for figure.
Built in Word.CaptionLabel(s) are found, also WdReferenceType Enumerators. Hence, if the BuiltIn Property is false, there are no references found, even if there are captions added (e.g. to figures). It should return a object, which I can cast to a string[],
but the returned array is empty.
To be clear: I do not mean the label itself. This is listed in Application.CaptionLabels.
I also noticed, that my intelli sense is putting out the usage should be await ActiveDocument.GetCrossReferenceItems(ref ...), but if I put it in this way I get an exception.
Any help would be much appreciated.
Best regards,
Andreas
UPDATE:
After trying something, it seems that this problem is concerning all CaptionLabels depending on the Office version used to create the document. If I use a document created with Word 2013 the caption labels are found, if I use a document created with Word
2016 no caption labels are passed using GetCrossReferenceItems method.
UPDATE 2:
After using Word 2016 a little bit more, it seems there are some bugs concerning caption labels. When I insert my caption label as above/below the whole caption text is inserted instead of the word "above" or "below". I hope some MS staff
reads this and can forward the problem to the developers.