VBA to msgbox if opened from outlook

Flora Edwards
Flora Edwards used Ask the Experts™
I need help with VBA that If someone opens my workbook from Outlook then it should state that "workbook opened from outlook"
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Rob HensonFinance Analyst

Depending on your Trust Centre settings, files opened from an email will be opened in Protected Mode and Read Only, It may be possible to check that status and report when Read Only.

Open in new window

If InStr(ActiveWorkbook.Path, "Content.Outlook") > 0 Then MsgBox ("Opened from Outlook")
Flora EdwardsMedicine


Kenneth Hobson

You are genius!

Thanks very much.  It worked perfectly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial