Is there a way to use regular expressions to match message patterns and replace them with hyperlinks without changing the original message? I just want to have helpers when viewing related material. For example, convert "invoice 1234" into a hyperlink to show the invoice from an external web site.
assuming the url is always the same and only the variable, yes. regex can find the invoice the pass the variable to a url which is the activated. i have regex examples at slipstick.com as well as sample code that opens urls.
Thank you, Diane. I did see your posts regarding both those topics but I'm new to the topic of Outlook macros. I gather I use Alt-F11 to create a macro, and somewhere else I map it to an event that causes it to run when the Reading Pane displays content? If you can draw my attention to a post that walks me through the basics I would be greatful. Thank you again,
To be clear, I don't want to open the links automatically. Really what I want is for the pane to automatically show hyperlinks for patterns without the user pressing any buttons to cause this format change. The action is only taken when the user clicks one of the links. I want to display the message with this rendering directly in the pane, but I don't want to alter the original message.
If I understand the example correctly the user must manually run a macro which then automatically exercises the link to the external system. Am I misunderstanding? Thank you again,
Yeah, the macro opens the links - it can be automatic but as written, you need to click a button.
I'm not aware of any way you can display a hyperlink without actually editing the message to add the hyperlink, other than using a pop-up box. you could use a message box, but it's modal and would basically prevent outlook from doing anything until you clicked ok. I'm not sure if a userform can be made non-modal. You could write it to a new message (word doc, excel, etc) - that wouldn't be modal.
The other option is a bigger project - a new pane on the right that shows the link. It may not be automatic - the user might need to click a button to show the pane. There is an example of this at Additional custom panel in Microsoft Outlook - CodeProject (not sure if that sample works in 2013/2016 but they do support panes )