How do I set Textbox properties?

B

Bo Hansson

In a document I've added a button to insert a Textbox like this:

Set myTB1 = ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal,
408, 45, 403, 310)

After that I would like to set the inside margins and remove the line that
frames the Textbox.
But I cannot figure out how to do that. Any suggestions?

/BosseH
 
G

Greg

Something like:
Sub Test()
Dim myTB1 As Shape
Set myTB1 =
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 408, 45,
403, 310)
With myTB1
.Line.Visible = msoFalse
.TextFrame.MarginLeft = 12
.TextFrame.MarginRight = 12
.TextFrame.MarginTop = 12
.TextFrame.MarginBottom = 12
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top