View Single Post
  #2   Report Post  
Posted to microsoft.public.word.newusers
Greg Maxey
 
Posts: n/a
Default remove all text boxes

Alan,

Convert to text is no problem. A smooth flow may be problematic. See the
explaination by Jay Freedman below:
Sub ScratchMacro()
'Convert TextBoxes to plain text.
Dim oShp As Shape
Dim i As Integer
For Each oShp In ActiveDocument.Shapes
If oShp.Type = msoTextBox Then oShp.ConvertToFrame
Next oShp
For i = ActiveDocument.Frames.Count To 1 Step -1
With ActiveDocument.Frames(i)
.Borders.Enable = False
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
.Delete
End With
Next
End Sub


Jay says: Now the wrinkle... Every graphic object in Word's drawing layer
(e.g., a textbox) has an "anchor", a spot in the regular text to which it's
attached. (You can see the anchor symbol in the left margin of Page Layout
view if you go to Tools Options View and check "Object anchors", then
select a textbox or floating picture.) When you convert the textbox to a
frame and then delete the frame, the text inside gets dumped into the
regular text at the anchor position.


Good luck.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Alan Smithee Jr. wrote:
Is there a way to pull all text out of all text boxes and just have
the complete text of the document flowing without any text boxes.

I have a 350 page document with (guessing) something like 1000 text
boxes filled with text.