S
Sue L.
Hi I need to create and send an email using MAPI that works when the client
is using outlook express, or a variety of versions of outlook.
I think this code will work with a variety of outlook versions, but it
doesn't work with outlook express
What do I need to do differently to work with Outlook Express and Outlook?
-------------- Code Snippet
Set oApp = CreateObject("Outlook.Application")
Set oOutbox = oApp.GetNamespace("MAPI").GetDefaultFolder(4) '4 =
olFolderOutbox enum value
Set oEmail = oApp.CreateItem(0) '0 - olMailItem enum value
http://msdn.microsoft.com/en-us/library/bb277434(v=office.12).aspx
With oEmail
.To = SendTo
.Subject = Subject
.Body = Body
.Recipients.ResolveAll
.Save
.send
End With
Set oEmail = Nothing
Set oOutbox = Nothing
Set oApp = Nothing
is using outlook express, or a variety of versions of outlook.
I think this code will work with a variety of outlook versions, but it
doesn't work with outlook express
What do I need to do differently to work with Outlook Express and Outlook?
-------------- Code Snippet
Set oApp = CreateObject("Outlook.Application")
Set oOutbox = oApp.GetNamespace("MAPI").GetDefaultFolder(4) '4 =
olFolderOutbox enum value
Set oEmail = oApp.CreateItem(0) '0 - olMailItem enum value
http://msdn.microsoft.com/en-us/library/bb277434(v=office.12).aspx
With oEmail
.To = SendTo
.Subject = Subject
.Body = Body
.Recipients.ResolveAll
.Save
.send
End With
Set oEmail = Nothing
Set oOutbox = Nothing
Set oApp = Nothing