View Single Post
 
Old 11-19-2020, 10:07 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,980
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I'm not aware of a built-in way to delete specific embedded xml files so you are going to need a macro to loop through your files and delete any on command. Try this macro
Code:
Sub CleanupXML()
  Dim aCX As CustomXMLPart, iResponse As Integer
  For Each aCX In ActiveDocument.CustomXMLParts
    Debug.Print aCX.NamespaceURI
    If Not aCX.BuiltIn Then
      iResponse = MsgBox(aCX.NamespaceURI & vbCr & vbCr & aCX.XML, vbYesNo, "Delete this one?")
      If iResponse = vbYes Then aCX.Delete
    End If
  Next aCX
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote