Compartir a través de


Método Shape.Group (Visio)

Agrupa los objetos seleccionados en una selección, o convierte una forma en un grupo.

Sintaxis

expresión. Grupo

expresión Variable que representa un objeto Shape.

Valor devuelto

Forma

Ejemplo

En el ejemplo siguiente se muestra cómo agrupar objetos Shape.

 
Public Sub Group_Example() 
 
 Dim vsoShape1 As Visio.Shape 
 Dim vsoShape2 As Visio.Shape 
 Dim vsoGroupShape As Visio.Shape 
 Dim vsoSelection As Visio.Selection 
 
 'Draw two rectangles. 
 Set vsoShape1 = ActivePage.DrawRectangle(1, 2, 2, 1) 
 Set vsoShape2 = ActivePage.DrawRectangle(1, 4, 2, 3) 
 
 'Deselect all shapes, and then select the two rectangles. 
 Set vsoSelection = ActiveWindow.Selection 
 vsoSelection.Select vsoShape1, visDeselectAll + visSelect 
 vsoSelection.Select vsoShape2, visSelect 
 
 'Group the rectangles into a group shape. 
 Set vsoGroupShape = vsoSelection.Group 
 
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.