EmailSubject Property 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".

For Each hlk In ActiveDocument.Hyperlinks
    If hlk.Address Like "mailto*" And _
            hlk.Address = hlk.EmailSubject Then
        hlk.EmailSubject = "NewProducts"
    End If
Next hlk