HyperlinkAction.vb
C# VB
'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''Imports System.DrawingImports GrapeCity.Documents.Word
Public Class HyperlinkAction Function CreateDocx() As GcWordDocument Dim doc = New GcWordDocument()
Dim run = doc.Body.AddParagraph().AddRun() Dim shape = run.GetRange().Shapes.Add(200, 200, GeometryType.Pentagon) shape.Fill.Type = FillType.Solid shape.Fill.SolidFill.RGB = Color.Coral shape.Line.Width = 3 shape.Line.Fill.SolidFill.RGB = Color.CadetBlue shape.AddTextFrame("This shape has HyperlinkOnClick and HyperlinkOnHover properties specified.") shape.Size.EffectExtent.AllEdges = 8
shape.HyperlinkOnClick.Address = New Uri("https://www.google.com/maps", UriKind.RelativeOrAbsolute) shape.HyperlinkOnClick.ScreenTip = "Go to Google Maps" shape.HyperlinkOnClick.HighlightClick = True
shape.HyperlinkOnHover.Address = New Uri("https://www.google.com", UriKind.RelativeOrAbsolute) shape.HyperlinkOnHover.ScreenTip = "Just Google" shape.HyperlinkOnHover.HighlightClick = True
Return doc End FunctionEnd Class