I want a way for a user to find each text box in the main story of a
multi-section document - kind of like 'browse by object' for text boxes - so
they can see whether or not the box should be deleted.

I don't see the option for searching for shapes in find, and I don't want to
do anything with the text boxes except maybe select them if necessary.

Any suggestions would be most appreciated, but I'm not an experienced vba
writer so comments associate with the code would really help.
--
Thanks, Jen

Re: Find each text box by Helmut

Helmut
Tue Jul 15 08:24:58 PDT 2008

Hi Jentimus,

>I want a way for a user to find each text box in the main story of a
>multi-section document - kind of like 'browse by object' for text boxes - so
>they can see whether or not the box should be deleted.
>
>I don't see the option for searching for shapes in find, and I don't want to
>do anything with the text boxes except maybe select them if necessary.
>
>Any suggestions would be most appreciated

if so, then this might get you started:
Sub Macro5a()
Dim s As String
Dim oShp As Shape
For Each oShp In ActiveDocument.Range.ShapeRange
If oShp.Type = msoTextBox Then
oShp.Select
ActiveWindow.ScrollIntoView oShp
' otherwise you possibly won't see the shape
s = InputBox("delete y/n")
Select Case s
Case "y": oShp.Delete
Case "n": ' do nothing
Case Else: Exit Sub
End Select
End If
Next

End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP