EmailSubject Property

Microsoft Word Visual Basic

EmailSubject Property

       

Returns or sets the text string for the specified hyperlink’s subject line. The subject line is appended to the hyperlink’s Internet address, or URL. Read/write String.

Remarks

This property is commonly used with e-mail hyperlinks. The value of this property takes precedence over any e-mail subject specified in the Address property of the same Hyperlink object.

Example

This example checks the active document for e-mail 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