Using MailTo Protocol in Visio Shapes

A newsgroup question asked whether you can send an email from a Visio shape, so I thought it was time to document an example of just that..

In this example, I have added four Shape Data rows for the Address, Subject, CC and BCC fields…

image

However, I have used the Screen Tip cell for the message body because it is the only out-of-the-box dialog that allows you to enter multi-line text into a Shape Cell.

image

To open the Screen Tip via the right mouse menu, I added the formula =DOCMD(1685) to an Actions row.

To force the Hyperlink.Address cell of the new Hyperlink.Mail row to update whenever any of the values in the four Shape Data rows or the Screen Tip is changed, I added the following formula to a new User-defined cell called, MailToTrigger:

=DEPENDSON(Prop.Address,Prop.Subject,Prop.CC,Prop.BCC,Comment)+SETF(GetRef(Hyperlink.Mail.Address),"=""MailTo:"&Prop.Address&"?Subject="&Prop.Subject&"&CC="&Prop.CC&"&BCC="&Prop.BCC&"&Body="&Comment&"""")

That’s it! Just enter email addresses, a subject and body, then your mail client will be opened pre-filled from the right-mouse menu of the VIsio shape, or, of course, from a SaveAs web page.

You can read about the MailTo protocol here: http://msdn.microsoft.com/en-us/library/aa767737.aspx

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Joanne C Klein

Compliance in Microsoft 365

JackBinnall

O365 and Power Platform

Simplify Tasks

Want to learn the simple way?

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

John Goldsmith's visLog

be smart, be clear, be visual ...

Mo's blog

Personal views on Dynamics 365 for Operations and Technical Architecture.

Chris Webb's BI Blog

Microsoft Fabric, Power BI, Analysis Services, DAX, M, MDX, Power Query, Power Pivot and Excel

davecra.wordpress.com/

Solutions for Microsoft Office, and more...

Rob Fahrni

I AM FAHRNI

john Visio MVP

Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Smart graphics for visual people