Propriedade Characters. Shape (Visio)Characters.Shape property (Visio)

Retorna o objeto Shape que possui uma célula, caracteres, linhaou objeto Section ou que está associado a um hiperlink ou objeto OLEObject ou à coleção hyperlinks. ****Returns the Shape object that owns a Cell, Characters, Row, or Section object or that is associated with a Hyperlink or OLEObject object or with the Hyperlinks collection. Somente leitura.Read-only.

SintaxeSyntax

expressão. Formaexpression.Shape

expressão Uma variável que representa um objeto Characters.expression A variable that represents a Characters object.

Valor de retornoReturn value

FormaShape

ExemploExample

Esta macro do Microsoft Visual Basic for Applications (VBA) mostra como usar a propriedade Shape para obter os objetos Shape que possuem um objeto Cell e Characters .This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Shape property to get the Shape objects that own a Cell and a Characters object.

 
Public Sub Shape_Example() 
 
 Dim vsoRectangle As Visio.Shape 
 Dim vsoOval As Visio.Shape 
 Dim vsoShapeFromCell As Visio.Shape 
 Dim vsoShapeFromCharacters As Visio.Shape 
 Dim vsoCell As Visio.Cell 
 Dim vsoCharacters As Visio.Characters 
 
 'Create 2 different shapes and add different text to each shape. 
 Set vsoRectangle = ActivePage.DrawRectangle(2, 3, 5, 4) 
 Set vsoOval = ActivePage.DrawOval(2, 5, 5, 7) 
 vsoRectangle.Text = "Rectangle Shape" 
 vsoOval.Text = "Oval Shape" 
 
 'Get a Cell object from the first shape. 
 Set vsoCell = vsoRectangle.Cells("Width") 
 
 'Get a Characters object from the second shape. 
 Set vsoCharacters = vsoOval.Characters 
 
 'Use the Shape property to get the Shape object. 
 Set vsoShapeFromCell = vsoCell.Shape 
 Set vsoShapeFromCharacters = vsoCharacters.Shape 
 
 'Use each shape's text to verify the proper Shape 
 'object was returned. 
 Debug.Print vsoShapeFromCell.Text 
 Debug.Print vsoShapeFromCharacters.Text 
 
End Sub

Suporte e comentáriosSupport and feedback

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação?Have questions or feedback about Office VBA or this documentation? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.