Compartir a través de


Propiedad Hyperlink.Address (Publisher)

Devuelve o establece una cadena que representa la dirección URL de un hipervínculo. Lectura y escritura.

Sintaxis

expresión. Dirección

expresión Variable que representa un objeto Hyperlink .

Valor devuelto

String

Ejemplo

En este ejemplo se muestran las direcciones URL de todos los hipervínculos de la publicación activa.

Sub ShowHyperlinkAddresses() 
 Dim pgsPage As Page 
 Dim shpShape As Shape 
 Dim hprLink As Hyperlink 
 Dim intCount As Integer 
 For Each pgsPage In ActiveDocument.Pages 
 For Each shpShape In pgsPage.Shapes 
 If shpShape.TextFrame.TextRange.Hyperlinks.Count > 0 Then 
 For Each hprLink In shpShape.TextFrame.TextRange.Hyperlinks 
 MsgBox "This hyperlink goes to " & hprLink.Address & "." 
 intCount = intCount + 1 
 Next hprLink 
 ElseIf shpShape.Hyperlink.Address <> "" Then 
 MsgBox "This hyperlink goes to " & shpShape.Hyperlink.Address & "." 
 intCount = intCount + 1 
 End If 
 Next shpShape 
 Next pgsPage 
 If intCount < 1 Then 
 MsgBox "You don't have any hyperlinks in your publication." 
 Else 
 MsgBox "You have " & intCount & " hyperlinks in " & ThisDocument.Name & "." 
 End If 
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.