Macro to edit WordArt entries?

T

Terry Pinnell

Does anyone know of a macro which can do the following please?

Start with a spreadsheet WordArt.xls containing WordArt entries of
various types and colours. The text string is identical in each case.
I want to change the text just once, to get a fully revised
spreadsheet. IOW, instead of selecting each entry one by one and using
Edit Text, which would be very tedious.

Any help would be much appreciated please.
 
J

JLatham

Try this - goes through all of the sheets in a workbook and any shape that is
of type 15 (WordArt), changes it to the text you enter at the beginning.
Just enter nothing to quit that without changing any WordArt objects:


Sub EditWordArt()
'
'
Dim strNewText As String
Dim anySheet As Worksheet
Dim anyWAObject As Shape

strNewText = InputBox("Enter new text for all WordArt Objectss", "New
Text", "")
If Trim(strNewText) = "" Then
Exit Sub
End If
For Each anySheet In Worksheets
For Each anyWAObject In anySheet.Shapes
If anyWAObject.Type = 15 Then ' WordArt item
anyWAObject.TextEffect.Text = strNewText
End If
Next
Next

End
 

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