Compartir a través de


Propiedad TextRange.ContainingObject (Publisher)

Devuelve un objeto Object que representa el objeto que contiene el intervalo de texto. Solo lectura.

Sintaxis

expresión. ContainingObject

expresión Variable que representa un objeto TextRange .

Valor devuelto

Objeto

Ejemplo

En este ejemplo se devuelve el nombre del objeto que contiene el intervalo de texto especificado.

Sub NameOfContainingObject() 
 With ActiveDocument.Pages(1).Shapes(1).TextFrame _ 
 .TextRange.ContainingObject 
 MsgBox The name of the object containing the text is " & .Name 
 End With 
End Sub

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.