Creating an email from Excel

maddog1978
03-19-2003, 09:26 AM
Hello,

I am using the folowing VBA code with excel to create an outlook email. The only problem is that after the email is created is saved to the draft folder. How do I create an email that pops up in a new window?


====================================================
Dim ObjOutlook As New Outlook.Application
Dim ObjMailItem As Outlook.MailItem

Set ObjOutlook = New Outlook.Application
Set ObjMailItem = ObjOutlook.CreateItem(olMailItem)

With ObjMailItem
.Attachments.Add "\\EQNYQUANT01\sample.jpg"
.save
End With
==================================================

maddog1978
03-19-2003, 09:29 AM
Just found the answer, use the display method instead of the save method.


With ObjMailItem
.Attachments.Add "\\EQNYQUANT01\sample.jpg"
.display
End With

Hello,

I am using the folowing VBA code with excel to create an outlook email. The only problem is that after the email is created is saved to the draft folder. How do I create an email that pops up in a new window?


====================================================
Dim ObjOutlook As New Outlook.Application
Dim ObjMailItem As Outlook.MailItem

Set ObjOutlook = New Outlook.Application
Set ObjMailItem = ObjOutlook.CreateItem(olMailItem)

With ObjMailItem
.Attachments.Add "\\EQNYQUANT01\sample.jpg"
.save
End With
==================================================

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum