J
João Correia
Hi,
I have a macro that builds a textbox, like this:
Sub Textbox()
Dim newTextbox As Shape
Dim t As Long
'localização do cursor
(wdHorizontalPositionRelativeToTextBoundary)
t = Selection.Information
(wdVerticalPositionRelativeToPage)
' add a text box
Set newTextbox = ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal,
Left:=130, Top:=t, Width:=300, Height:=20)
End Sub
I´d like to know what can I do to make the Height extend
to fit the text. If the text introduced by the user has
only one line, this height is fine, but if the text is
bigger, the textbox should get bigger too.
Thanks,
joão
I have a macro that builds a textbox, like this:
Sub Textbox()
Dim newTextbox As Shape
Dim t As Long
'localização do cursor
(wdHorizontalPositionRelativeToTextBoundary)
t = Selection.Information
(wdVerticalPositionRelativeToPage)
' add a text box
Set newTextbox = ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal,
Left:=130, Top:=t, Width:=300, Height:=20)
End Sub
I´d like to know what can I do to make the Height extend
to fit the text. If the text introduced by the user has
only one line, this height is fine, but if the text is
bigger, the textbox should get bigger too.
Thanks,
joão