Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
Devuelve un objeto Range que representa el texto del marco de texto especificado.
Sintaxis
expresión. TextRange
expresión Expresión que devuelve un objeto TextFrame .
Ejemplo
En este ejemplo se agrega un cuadro de texto al documento activo y, a continuación, se agrega texto al cuadro de texto.
Set myTBox = ActiveDocument.Shapes _
.AddTextBox(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=300, Height:=200)
myTBox.TextFrame.TextRange = "Test Box"
En este ejemplo se agrega texto al TextBox 1 del documento activo.
ActiveDocument.Shapes("TextBox 1").TextFrame.TextRange _
.InsertAfter("New Text")
En este ejemplo se devuelve el texto de TextBox 1 del documento activo y se muestra en un cuadro de mensaje.
MsgBox ActiveDocument.Shapes("TextBox 1").TextFrame.TextRange.Text
Vea también
Soporte técnico y comentarios
¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.