Hi,
Is it possible through VB or VBA to delete links to external files?
Thank you very much
Georg
Hi,
What kind of external file you are referring to? If derived part, you could use
DerivedPartComponent.BreakLinkToFile
As to 3rd files (OLE), you could choose type when adding
ReferencedOLEFileDescriptors.Add (FullFileName As String, [Type] As OLEDocumentTypeEnum)
where
OLEDocumentTypeEnum: kOLEDocumentEmbeddingObject means it is Embedding Document, not link document.
Hi,
so, the relevant API object is ReferencedOLEFileDescriptor. But no method to change its type from OLE link to embed, either does UI. If you want to delete the OLE, the method is ReferencedOLEFileDescriptor.Delete.
When opening the dialog "Links" I can see which items are unresolved; these have the text "No" in the column "Resolved". How can I determine through VBA which items are unresolved? I can't seem to find a property in ReferencedOLEFileDescriptors which indicate this.
Try using the ReferenceMissing property.
Well, the strange thing is:
I have an assembly which has multiple referenced files, most of them are parts of course which are resolved. Two of them are texture bitmaps which are unresolved according to the "Links" dialog (Tools ribbon --> Options --> Links). But when analyzing the ThisAssy.Document.Files.ReferencedFileDescriptors these two bitmaps have the ReferenceMissing property set to False like all the other referenced (and resolved) files..... . I expected these two unresolved files to have the ReferenceMissing property set to "True". So it seems I can't rely on that property.