Macro to Insert Text Boxes with No Borders in Word
Thread poster: Reed James
Reed James
Reed James
Chile
Local time: 23:34
Member (2005)
Spanish to English
Sep 20, 2016

Hello. I have this macro that will allow me to insert a text box of a fixed size with borders in a Word document: Dim Box As Shape Set Box = ActiveDocument.Shapes.addTextBox( _ Orientation:=msoTextOrientationHorizontal, _ Left:=50, Top:=50, Width:=100, Height:=100) 'This adds text to the box... Box.TextFrame.TextRange.Text = "Truck" However, I don't know how to do this with the borderless text box. Does anyone know? Thanks.

 
Dan Lucas
Dan Lucas  Identity Verified
United Kingdom
Local time: 04:34
Member (2014)
Japanese to English
Set to not visible? Sep 20, 2016

Reed James wrote:
Hello. I have this macro that will allow me to insert a text box of a fixed size with borders in a Word document:
However, I don't know how to do this with the borderless text box. Does anyone know? Thanks.


If you mean just getting rid of the line round the edge of the box, try this:

Dim Box As Shape
Set Box = ActiveDocument.Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=50, Top:=50, Width:=100, Height:=100)

With Box
.TextFrame.TextRange.Text = "Truck"
.Line.Visible = msoFalse
End With


Works here on Word 2016 and will probably work for earlier versions.

Dan


 
Reed James
Reed James
Chile
Local time: 23:34
Member (2005)
Spanish to English
TOPIC STARTER
That works! Sep 20, 2016

Hey thanks Dan! You don't know how long I've been creating text boxes and then making them borderless. Longer than I care to remember.

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Macro to Insert Text Boxes with No Borders in Word






TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »