H
HomeroOM
I've created a simple piece of VBA code, intending to save a message
programmtically created.
The code follows:
----------------
Dim A As Application
Dim M As MailItem
Dim R As Recipient
Set A = Application
Set M = A.CreateItem(olMailItem)
M.Body = "this is a single message testing."
Set R = M.Recipients.Add("(e-mail address removed)")
R.Type = olOriginator
M.Subject = "Mensagens para arquivar"
Set R = M.Recipients.Add("(e-mail address removed)")
R.Type = olTo
M.Save
Set A = Nothing
Set M = Nothing
Set R = Nothing
programmtically created.
The code follows:
----------------
Dim A As Application
Dim M As MailItem
Dim R As Recipient
Set A = Application
Set M = A.CreateItem(olMailItem)
M.Body = "this is a single message testing."
Set R = M.Recipients.Add("(e-mail address removed)")
R.Type = olOriginator
M.Subject = "Mensagens para arquivar"
Set R = M.Recipients.Add("(e-mail address removed)")
R.Type = olTo
M.Save
Set A = Nothing
Set M = Nothing
Set R = Nothing