I'm writing a VB.NET utility for generating a list of all files linked to by a Microsoft Word doc. The file in question links both to Excel files and to other Word documents. I'm currently using this code:
Dim OOXMLDoc As WordprocessingDocument = WordprocessingDocument.Open(fileNameAndPath, isEditable:=False)
Dim linkUris As IEnumerable(Of System.Uri) = From rel In OOXMLDoc.MainDocumentPart.ExternalRelationships
Select rel.Uri
The results contain all the relevant spreadsheet links, but the links to the word documents are missing.