Sanjeev Sabhlok's notes on technology, hardware, gardening

VBA code for Microsoft word macros >> remove text boxes >> remove tables

REMOVE TEXT BOXES

The VBA code to remove all text boxes without keeping text:

Sub Test()
Dim oShp As Word.Shape
Dim i As Long
For i = ActiveDocument.Shapes.Count To 1 Step -1
Set oShp = ActiveDocument.Shapes(i)
If oShp.Type = msoTextBox Then
oShp.Delete
End If
Next i
End Sub

 

REMOVE TABLES

see on google

 

 

Print Friendly

sabhlok

View more posts from this author

Leave a Reply

Your email address will not be published. Required fields are marked *