Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Text boxes and saving as plain text

    When I save a Word 2010 file as plain text, text boxes are excluded. Is there a way to save a document as plain text with text boxes included?
    Last edited by macropod; 2016-06-08 at 18:22. Reason: Restored to original question

  2. #2
    Star Lounger Graham Mayor's Avatar
    Join Date
    Mar 2016
    Location
    Cyprus
    Posts
    68
    Thanks
    0
    Thanked 24 Times in 24 Posts
    No. Text boxes are not compatible with plain text format. They are essentially graphical elements containing text.
    Graham Mayor - Word MVP
    http://www.gmayor.com

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Thanks for your reply. I found a macro that converts text boxes into ordinary text, and then I can save the lot as plain text, which does the trick.

    http://answers.microsoft.com/en-us/o...2e3fbf2?page=2

    Code:
    Sub ExtractTextBoxes()
     Dim lngIndex As Long
     Dim aShape As Shape
     Dim oILS As InlineShape
     Dim oRng As Word.Range
     Dim strText As String
       For lngIndex = ActiveDocument.Shapes.Count To 1 Step -1
         Set aShape = ActiveDocument.Shapes(lngIndex)
         If aShape.Type = msoTextBox Then
           strText = aShape.TextFrame.TextRange.Text
           Set oILS = aShape.ConvertToInlineShape
           Set oRng = oILS.Range
           oRng.Text = strText
         End If
       Next
     End Sub

  4. #4
    Star Lounger Graham Mayor's Avatar
    Join Date
    Mar 2016
    Location
    Cyprus
    Posts
    68
    Thanks
    0
    Thanked 24 Times in 24 Posts
    That would probably do it, but it is an answer to a different question from that which you asked
    Graham Mayor - Word MVP
    http://www.gmayor.com

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    I have now edited the question to be more precise.

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by Murgatroyd View Post
    I have now edited the question to be more precise.
    Kindly don't do that. You have now distorted the flow of the discussion. I have restored the text to reflect the question as asked and answered.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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