Hyperlink.EmailSubject property (Word)
Returns or sets the text string for the specified hyperlink's subject line. Read/write String.
Syntax
expression.EmailSubject
expression A variable that represents a 'Hyperlink' object.
Remarks
The subject line is appended to the hyperlink's Internet address, or URL. This property is commonly used with email hyperlinks. The value of this property takes precedence over any email subject specified in the Address property of the same Hyperlink object.
Example
This example checks the active document for email hyperlinks; if it finds any that have a blank subject line, it adds the subject "NewProducts".
Dim hypLoop As Hyperlink
For Each hypLoop In ActiveDocument.Hyperlinks
If hypLoop.Address Like "mailto*" And _
hypLoop.Address = hypLoop.EmailSubject Then
hypLoop.EmailSubject = "NewProducts"
End If
Next hypLoop
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.