Previous Document Next Document

Object Model Reference : Classes : S : Shape : Properties : Shape.URL


Shape.URL

Property URL As URL

Description

Member of Shape

The URL property returns a URL object that represents the hyperlink properties associated with a shape.

The URL property returns a read-only value.

VBA example

The following VBA example sets a bookmark for each rectangle on the page and links each ellipse to each rectangle.

Sub Test()
 Dim s As Shape
 Dim col As New Collection
 Dim n As Long
 For Each s In ActivePage.FindShapes(Type:=cdrRectangleShape)
  col.Add s.StaticID
  s.URL.BookMark = "Rectangle" & s.StaticID
 Next s
 n = 1
 For Each s In ActivePage.FindShapes(Type:=cdrEllipseShape)
  If n > col.Count Then Exit For
  s.URL.Address = "Rectangle" & col(n)
  s.URL.AltComment = "Link to the rectangle shape"
  n = n + 1
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.