Selecting multiple text boxes

G

Gazzit

Is there a way to select multiple text boxes without having to step through a
whole document, say with a Find or Select All type parameter or by running a
macro? I have a number of text boxes and want to be able to toggle them all
to be either in fron or behind the normal page text.
 
S

Stefan Blom

You can select the first text box, scroll the document and hold Shift as you
click additional text boxes. But using a macro would probably be easier.
In its simplest form, you can use something like this:

Sub testing()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.WrapFormat.Type = wdWrapBehind 'or wdWrapFront
End If

Next s
End Sub

Observe that this macro sets the same option for all text boxes, no matter
what the individual setting for each text box happens to be when you run the
macro.

For assistance, see http://www.gmayor.com/installing_macro.htm.
 
G

Gazzit

Thanks Stefan, it works a treat.

Stefan Blom said:
You can select the first text box, scroll the document and hold Shift as you
click additional text boxes. But using a macro would probably be easier.
In its simplest form, you can use something like this:

Sub testing()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.WrapFormat.Type = wdWrapBehind 'or wdWrapFront
End If

Next s
End Sub

Observe that this macro sets the same option for all text boxes, no matter
what the individual setting for each text box happens to be when you run the
macro.

For assistance, see http://www.gmayor.com/installing_macro.htm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top