Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert form text boxes to normal text on save in 2003? | Microsoft Word Help | |||
Aligning check boxes and text boxes with regular text | Microsoft Word Help | |||
Aligning check boxes and text boxes with regular text | Microsoft Word Help | |||
Can I hide the text boxes when printing? I used text boxes to ove. | Microsoft Word Help | |||
delete text boxes from word document leaving text intact | Microsoft Word Help |