Hi @eladm. You can give something like this a try (code below). However, this is a big step, so you may want to put a prompted question in there, which will pause to ask the user if they are sure they want to go ahead with this step. But that's up to you.
Dim oDoc As Document = ThisDoc.Document
Dim oRefDocs As DocumentsEnumerator = oDoc.AllReferencedDocuments
If oRefDocs.Count = 0 Then Exit Sub
For Each oRefDoc As Document In oRefDocs
Dim oRefOLEFileDs As ReferencedOLEFileDescriptors = oRefDoc.ReferencedOLEFileDescriptors
If oRefOLEFileDs.Count = 0 Then Continue For
For Each oRefFileD As ReferencedOLEFileDescriptor In oRefOLEFileDs
Try : oRefFileD.Delete : Catch : End Try
Next
Next
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)