Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Explode text box?
A certain PDF converter program places text in text boxes when it converts to Word. How
can I get the text out of the box? I think the boxes are linked, because if I delete one the whole page disappears. However, I know next to nothing about text boxes. Also, how can I get the boxes to be invisible? Not the text, of course, but the dashed outline around the box. rs |
#2
|
|||
|
|||
Try running this procedure posted earlier by Helmut Weber:
Sub ConvertTextBoxesToText() Dim oShp As Shape ' a shape Dim lPrg As Long ' the position of the anchor Dim rTmp As Range ' a temporary range Dim nPrg As Long ' number of paragraph anchor is in Dim lShp As Long ' counter for shapes With ActiveDocument.Shapes For lShp = .Count To 1 Step -1 If .Item(lShp).Type = msoTextBox Then sTxt = .Item(lShp).TextFrame.TextRange.Text lPrg = .Item(lShp).Anchor.Start Set rTmp = ActiveDocument.Range(Start:=0, End:=lPrg) nPrg = rTmp.Paragraphs.Count + 1 ActiveDocument.Paragraphs(nPrg).Range.Text = _ ActiveDocument.Paragraphs(nPrg).Range.Text & " " & sTxt End If Next End With End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. tcebob wrote: A certain PDF converter program places text in text boxes when it converts to Word. How can I get the text out of the box? I think the boxes are linked, because if I delete one the whole page disappears. However, I know next to nothing about text boxes. Also, how can I get the boxes to be invisible? Not the text, of course, but the dashed outline around the box. rs |
#3
|
|||
|
|||
Wow! 14 minutes. Thanks, Greg, for being alert.
rs "Greg Maxey" wrote in message ... : Try running this procedure posted earlier by Helmut Weber: : : Sub ConvertTextBoxesToText() : Dim oShp As Shape ' a shape : Dim lPrg As Long ' the position of the anchor : Dim rTmp As Range ' a temporary range : Dim nPrg As Long ' number of paragraph anchor is in : Dim lShp As Long ' counter for shapes : With ActiveDocument.Shapes : For lShp = .Count To 1 Step -1 : If .Item(lShp).Type = msoTextBox Then : sTxt = .Item(lShp).TextFrame.TextRange.Text : lPrg = .Item(lShp).Anchor.Start : Set rTmp = ActiveDocument.Range(Start:=0, End:=lPrg) : nPrg = rTmp.Paragraphs.Count + 1 : ActiveDocument.Paragraphs(nPrg).Range.Text = _ : ActiveDocument.Paragraphs(nPrg).Range.Text & " " & sTxt : End If : Next : End With : End Sub : : : : -- : Greg Maxey/Word MVP : See: : http://gregmaxey.mvps.org/word_tips.htm : For some helpful tips using Word. : : tcebob wrote: : A certain PDF converter program places text in text boxes when it : converts to Word. How can I get the text out of the box? I think the : boxes are linked, because if I delete one the whole page disappears. : However, I know next to nothing about text boxes. : : Also, how can I get the boxes to be invisible? Not the text, of : course, but the dashed outline around the box. : : rs : : |
#4
|
|||
|
|||
Are they definitely Text Boxes rather than Frames? If it is frames, you can
simply do a SelectAll (Ctrl+A) and RemoveFrames (though you will need to drag this command onto a Toolbar using Customise dialog). -- Terry Farrell - Word MVP http://word.mvps.org/ "tcebob" handle @ gwi.net wrote in message ... : Wow! 14 minutes. Thanks, Greg, for being alert. : : rs : : "Greg Maxey" wrote in message : ... :: Try running this procedure posted earlier by Helmut Weber: :: :: Sub ConvertTextBoxesToText() :: Dim oShp As Shape ' a shape :: Dim lPrg As Long ' the position of the anchor :: Dim rTmp As Range ' a temporary range :: Dim nPrg As Long ' number of paragraph anchor is in :: Dim lShp As Long ' counter for shapes :: With ActiveDocument.Shapes :: For lShp = .Count To 1 Step -1 :: If .Item(lShp).Type = msoTextBox Then :: sTxt = .Item(lShp).TextFrame.TextRange.Text :: lPrg = .Item(lShp).Anchor.Start :: Set rTmp = ActiveDocument.Range(Start:=0, End:=lPrg) :: nPrg = rTmp.Paragraphs.Count + 1 :: ActiveDocument.Paragraphs(nPrg).Range.Text = _ :: ActiveDocument.Paragraphs(nPrg).Range.Text & " " & sTxt :: End If :: Next :: End With :: End Sub :: :: :: :: -- :: Greg Maxey/Word MVP :: See: :: http://gregmaxey.mvps.org/word_tips.htm :: For some helpful tips using Word. :: :: tcebob wrote: :: A certain PDF converter program places text in text boxes when it :: converts to Word. How can I get the text out of the box? I think the :: boxes are linked, because if I delete one the whole page disappears. :: However, I know next to nothing about text boxes. :: :: Also, how can I get the boxes to be invisible? Not the text, of :: course, but the dashed outline around the box. :: :: rs :: :: : : |
#5
|
|||
|
|||
tcebob shared this with us in microsoft.public.word.newusers:
Wow! 14 minutes. Thanks, Greg, for being alert. Be alert. This world needs more lerts. ;-) -- Amedee Van Gasse using XanaNews 1.17.4.1 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can autocomplete insert unformatted text into a document? | Microsoft Word Help | |||
Numbers to appear at the cursor... | New Users | |||
Mirror Text Box | Formatting Long Documents | |||
A problem with text boxes and free space on the page | New Users | |||
Outline | Page Layout |