Remove all frames from document with VBA code Microsoft Office 2007

VBA code can quickly remove all frames from document, do as follows:

Step 1: Press Alt+F11 to open VBA window;

Step 2: Click Module from Insert tab, put the code into Module window;

Step 3: Click Run button or press F5 to apply the VBA.

The VBA code to remove all frames:

Sub RemoveFrames()
Dim frm As Frame
For Each frm In ActiveDocument.Frames
Next frm
End Sub