The body of the task contains a hyperlink but it displays as <a href="https://website.com/stuff/edit.aspx?ID=164265">1234</a> versus just 1234 which is hyperlinked. I've read the COM docs and noticed tasks use RTFBody (I could not find an HTML option) but the link itself (https://website.com/stuff/edit.aspx?ID=164265) is hyperlinked in the task body (see screenshot) so clearly that is not necessary. In an Outlook email, use of a href works. Any ideas? Thanks!
Code: Select all
linktest := "https://website.com/stuff/edit.aspx?ID="
FormatTime, DateSub,, ShortDate
FormatTime, TimeSub,, Time
olApp := ComObjCreate("Outlook.Application")
olTask := olApp.CreateItem(3)
olTask.StartDate := DateSub
olTask.DueDate := DateSub
olTask.Subject := "Report F/U - Smith (1234)"
olTask.Body := "Check status of report regarding Smith (1234) submitted on " . DateSub . " at " . TimeSub . "`n`n <a href=""" . linktest . LinkNum . """>" . WebNum . "</a>"
olTask.ReminderSet := true
olTask.Status := 1
olTask.ReminderTime := AddTime(60)
olTask.Display