Try this. I import SVG geo map data often and encounter this issue frequently. Been working fine for me thus far.
Sub SVG_Cleanup()If ActiveShape Is Nothing Then Exit Sub
ActiveDocument.BeginCommandGroup "Remove SVG data"Del_SVG ActiveSelectionRange.Shapes MsgBox "SVG Data deleted"ActiveDocument.EndCommandGroupEnd SubFunction Del_SVG(sa As Shapes)Dim s As ShapeFor Each s In sa If s.Type = cdrGroupShape Then Del_SVG s.Shapes Else s.Locked = False If s.Type = cdrNoShape Then s.Delete End If End IfNext sEnd Function
Good job with recursion
Great people with great heart like ocean. Love you all
oho it is not clearning up without selection of svg. with selection only it is cleaning. please kindly update
Give this a try.
Sub Delete_SVGData()Dim sr As ShapeRangeSet sr = ActivePage.Shapes.FindShapes(Query:="@com.type=0")sr.DeleteEnd Sub
working, but first i tried without having any selection i hitted the svgdelete script, but nothing happened. i observed this in object docker. later i tried this. selected the svg element, and seen locked objects in the object docker... now i launched, nothing happened. then i hit unlock all command and used the script then it is removed. I WANT THEM TO REMOVE AT ONCE WITHOUT ANY SELECTION OR HITTING UNLOCK OR ETC.
Sub Delete_SVGData()Dim sr As ShapeRangeSet sr = ActivePage.Shapes.FindShapes(Query:="@com.Type=0")sr.Unlocksr.DeleteEnd Sub
Perfect sir. Just Love you for your support . Also please help in this regard sir. is this possible through scripting.
Note: Using ALL Caps on forums is equivalent to yelling! Please don't yell at me or anyone on this forum. Not proper forum etiquette There are better ways like setting the text to bold if you want to focus attention.
Not sure what you mean 'through scripting'.