Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
71 lines (46 loc) · 1.76 KB

hyperlink-shape-property-visio.md

File metadata and controls

71 lines (46 loc) · 1.76 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
Hyperlink.Shape Property (Visio)
vis_sdr.chm15014320
vis_sdr.chm15014320
visio
Visio.Hyperlink.Shape
554b5282-d7dd-1aca-c579-ab11daf42837
06/08/2017

Hyperlink.Shape Property (Visio)

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. Read-only.

Syntax

expression . Shape

expression A variable that represents a Hyperlink object.

Return Value

Shape

Example

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