cloudcover
10-09-2012, 03:26 AM
How do I delete a button in Word 2010, using VBA? I'm using this code:
Dim o As Object
For Each o In ActiveDocument.InlineShapes
If o.OLEFormat.Object.Caption = "Test" Then
o.Delete
End If
Next
It worked for a few days, but now I get an 'Object variable or With block variable not set' error.
Thanks
Dim o As Object
For Each o In ActiveDocument.InlineShapes
If o.OLEFormat.Object.Caption = "Test" Then
o.Delete
End If
Next
It worked for a few days, but now I get an 'Object variable or With block variable not set' error.
Thanks