Hi All,
I have up and running code to send email from a vb form.
Although, outlook security continualy asks for confirmation to allow programs access (this will be the next area I tackle if I can get this one to work), the emails are being sent ok.
I want a way to send emails using a particular custom form.
The code I have working to send mail items is as follows:
I have tried to include custom (user) properties, but these aren't displayed withn the receivers email.
Can anybody help me to use VB code to send using a custom form.
TIA
kesm
I have up and running code to send email from a vb form.
Although, outlook security continualy asks for confirmation to allow programs access (this will be the next area I tackle if I can get this one to work), the emails are being sent ok.
I want a way to send emails using a particular custom form.
The code I have working to send mail items is as follows:
Code:
Dim MyOlApp As Outlook.Application
Dim MyItem As MailItem
Dim MyProp
Set MyOlApp = CreateObject("Outlook.Application")
Set MyItem = MyOlApp.CreateItem(olMailItem) 'MyOlApp.CreateItem(olMailItem)
Set MyProp = MyItem.UserProperties.Add("MyPropName", olText)
MyProp = "TEXT ITEM"
MyItem.Save
Set myAttachments = MyItem.Attachments
myAttachments.Add "C:\ESpool\Images\test.tif", _
olByValue, 1, "Test Attachment"
MyItem.To = "EMAILADDRESS"
MyItem.Send
I have tried to include custom (user) properties, but these aren't displayed withn the receivers email.
Can anybody help me to use VB code to send using a custom form.
TIA
kesm