Search code examples
vbaoutlookms-office

How to run a VBA code when click in hyperlink in a html table on email body


I would like to call a VBA code (Sub or Function) when user click in hyperlink inside an html table. The body of email is in html format just as a table, attached an image.

Thanks a lot.

enter image description here


Solution

  • Outlook displays and edit messages using Word-light. Its Document object can be accessed through Inspector.WordEditor (if a message is displayed in an Inspector) or through Explorer.PreviewPane.WordEditor.

    Word Object Model does not expose any events that fire when a link is clicked.