#1   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Search for Text Box

Is it possible to do a "search and replace" on Text Boxes in order to remove
them completely from a document?

Thanks so much in advance.

Rod

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Search for Text Box

You can use the following macro to delete all text boxes and their
contents:

Sub DeleteAllTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.Delete
End If
Next s
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Is it possible to do a "search and replace" on Text Boxes in order

to remove
them completely from a document?

Thanks so much in advance.

Rod





  #3   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Search for Text Box

Stefan:

As always, thanks so very much for your assistance in this regard. I am
going to put your macro to the test and will be certain to let you know if it
cures "what is ailing both me and this document".

Just to let you know, my situation arose from the process of converting pdf
files to Word files and many times during the conversion, the text was
converted as text boxes, as opposed to actual text and I was looking for a
way of addressing the issue. I guess I should have let you know all of that
in the first posting - however, you seem to have come up with a solution just
the same. :-)

Rod

"Stefan Blom" wrote:

You can use the following macro to delete all text boxes and their
contents:

Sub DeleteAllTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.Delete
End If
Next s
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Is it possible to do a "search and replace" on Text Boxes in order

to remove
them completely from a document?

Thanks so much in advance.

Rod






  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Search for Text Box

Text in a PDF will often be in text boxes after it's been converted to
Word format; this is a limitation of the conversion process. It's then
up to you, the writer, to fix the mess...

As stated in my previous reply, the code I suggested deletes any
contents of the text boxes, including the text. If this is not what
you want, a different macro is required. Note, however, that it would
be difficult or even impossible for a macro to figure out where to
reinsert the text (in the normal text flow).

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Stefan:

As always, thanks so very much for your assistance in this regard.

I am
going to put your macro to the test and will be certain to let you

know if it
cures "what is ailing both me and this document".

Just to let you know, my situation arose from the process of

converting pdf
files to Word files and many times during the conversion, the text

was
converted as text boxes, as opposed to actual text and I was looking

for a
way of addressing the issue. I guess I should have let you know all

of that
in the first posting - however, you seem to have come up with a

solution just
the same. :-)

Rod

"Stefan Blom" wrote:

You can use the following macro to delete all text boxes and their
contents:

Sub DeleteAllTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.Delete
End If
Next s
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Is it possible to do a "search and replace" on Text Boxes in

order
to remove
them completely from a document?

Thanks so much in advance.

Rod












  #5   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Search for Text Box

Stefan:

My apologies for taking so long in getting back to you. In the meantime, I
have used the macro that you shared with me and it works just great.

Thanks Again - Rod

"Stefan Blom" wrote:

Text in a PDF will often be in text boxes after it's been converted to
Word format; this is a limitation of the conversion process. It's then
up to you, the writer, to fix the mess...

As stated in my previous reply, the code I suggested deletes any
contents of the text boxes, including the text. If this is not what
you want, a different macro is required. Note, however, that it would
be difficult or even impossible for a macro to figure out where to
reinsert the text (in the normal text flow).

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Stefan:

As always, thanks so very much for your assistance in this regard.

I am
going to put your macro to the test and will be certain to let you

know if it
cures "what is ailing both me and this document".

Just to let you know, my situation arose from the process of

converting pdf
files to Word files and many times during the conversion, the text

was
converted as text boxes, as opposed to actual text and I was looking

for a
way of addressing the issue. I guess I should have let you know all

of that
in the first posting - however, you seem to have come up with a

solution just
the same. :-)

Rod

"Stefan Blom" wrote:

You can use the following macro to delete all text boxes and their
contents:

Sub DeleteAllTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
If s.Type = msoTextBox Then
s.Delete
End If
Next s
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"RPMitchal" wrote in message
...
Is it possible to do a "search and replace" on Text Boxes in

order
to remove
them completely from a document?

Thanks so much in advance.

Rod













Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search documents for text Bruce Microsoft Word Help 1 March 23rd 07 04:50 PM
how do I tell word to search outside the text box if insertion pt is in it rllewis Microsoft Word Help 2 December 15th 06 01:51 AM
search for black-lined text Georgea Microsoft Word Help 1 November 9th 06 10:17 PM
How do I do a search for text within a folder not just a document? Tangojan Microsoft Word Help 1 May 24th 06 03:12 PM
Search for text and replace with fields? Rolf Barbakken Microsoft Word Help 2 July 23rd 05 11:42 PM


All times are GMT +1. The time now is 02:47 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"