Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting text only in Word

Status
Not open for further replies.

transl8r

Technical User
Apr 1, 2010
1
US
Hi,

I need to isolate all of the textboxes and shapes in a Word file; i.e. I need to delete all of the text not in textboxes or shapes. Does anyone have any idea of how to do this in VBA? Any help would be greatly appreciated.

Kind regards,

Julie
 


Hi,

This hardly makes sense, when you want to remove TEXT from a TEXT processor. That would wreak havok with ANY shapes, resulting in many shapes being crammed together.

What's the purpose?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Julie,

Ctrl-A, then a wildacrd Find/Replace, with
Find '[^11-^255]'
Replace ''
(omit the quotes). You could, of course record this action with the macro recorder.

You don't say which version of Word you're using. Do note that a bug in Word 2007 may cause you to lose any shapes in the range.


Cheers
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top