#1   Report Post  
Posted to microsoft.public.word.docmanagement
Lous Lous is offline
external usenet poster
 
Posts: 1
Default text boxes

I have an application that generates its output as a Word file. However, the
Word file is comprised of many individual text boxes. How can I combine the
boxes to produce a normal word document without text boxes?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default text boxes

If they are text boxes and not frames then

Sub ExtractFromTextBoxes()
Dim aShape As Shape
Dim sSource As Document
Dim sTarget As Document
Application.ScreenUpdating = False
Set sSource = ActiveDocument
Set sTarget = Documents.Add
sSource.Activate
With ActiveDocument
For Each aShape In .Shapes
If aShape.Type = msoTextBox Then
With aShape
If .TextFrame.HasText Then
.TextFrame.TextRange.Copy
sTarget.Activate
Selection.Paste
sSource.Activate
End If
End With
End If
Next aShape
sSource.Close SaveChanges:=wdDoNotSaveChanges End With
Application.ScreenUpdating = True End Sub

http://www.gmayor.com/installing_macro.htm

will extract the text to the main document. It will not format the document.
You will have to do that yourself.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Lous wrote:
I have an application that generates its output as a Word file.
However, the Word file is comprised of many individual text boxes.
How can I combine the boxes to produce a normal word document without
text boxes?



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
Convert form text boxes to normal text on save in 2003? Cheese_whiz Microsoft Word Help 2 April 3rd 08 12:15 AM
Aligning check boxes and text boxes with regular text ssbell Microsoft Word Help 1 March 28th 07 02:12 AM
Aligning check boxes and text boxes with regular text Simon Jones [MSDL] Microsoft Word Help 0 March 28th 07 12:17 AM
Can I hide the text boxes when printing? I used text boxes to ove. Jaz Microsoft Word Help 1 May 24th 06 12:29 PM
delete text boxes from word document leaving text intact woody Microsoft Word Help 2 April 17th 06 03:30 PM


All times are GMT +1. The time now is 07:36 AM.

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"