Generating Emails from Visio Map

J

jaggy

Is it possible to create a macro that will generate an email
prepopulated with addressee, subject and message text? If so, how
would I go about doing this?

Thanks in advance,
jaggy
 
C

Chris Roth [MVP]

Hi Jaggy,

Is your question more about how to create an e-mail with, say VBA, or do you
need to do something specific with Visio? Is your data coming from shapes in
a Visio diagram?

Regarding email in general, here's a snippet I found on the web
(http://www.vba-programmer.com) that automates Outlook, for example

Sub SendMail()

Dim myOutlook As Object

Dim myMailItem As Object '... Make instance
Set myOutlook = CreateObject("Outlook.Application")

Set myMailItem = myOutlook.createitem(0) '...Make mail item

myMailItem.Recipients.Add "Doe, John" '...Set recipient (internal
mail)
myMailItem.Recipients.Add "(e-mail address removed)" '... Set recipient
(external mail)

myMailItem.Subject = "test" '...Set subject
myMailItem.body = "Quick test!" '...Set body

myMailItem.send '...And send it!
Set myOutlook = Nothing '...Close instance

End Sub


--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top