Macro to Insert Text Boxes with No Borders in Word
Thread poster: Reed James
Reed James
Reed James
Chile
Local time: 18:11
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: 21:11
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: 18:11
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






Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »