Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jun 2004
    Location
    Oxford, Oxfordshire, United Kingdom
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text boxes (2003)

    I've just received a long OCR'd document which puts all the material on each page into a text box. Can anyone suggest a macro or some key strokes that would remove the text boxes and just leave me with the text? Or do I just have to cut and paste the contents of each text box into another document?
    many thanks in advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: text boxes (2003)

    You could try this macro, but there is no guarantee that the text in the resulting document will be in the correct order:

    Sub LoseTextboxes()
    Dim docS As Document
    Dim docT As Document
    Dim shp As Shape
    Dim rng As Range
    Set docS = ActiveDocument
    Set docT = Documents.Add
    For Each shp In docS.Shapes
    If shp.Type = msoTextBox Then
    shp.TextFrame.TextRange.Copy
    Set rng = docT.Content
    rng.Collapse Direction:=wdCollapseEnd
    rng.Paste
    End If
    Next shp
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Jun 2004
    Location
    Oxford, Oxfordshire, United Kingdom
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text boxes (2003)

    many thanks--that seems to have done the trick!

    all good wishes

    Philip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •