Hi!
I customized a Contact form,I add a lot of fields on it like "To", "Subject" fields
and a button. On the click event of this button I want to send this Item(the contact form
that I modified). But I don't know how to add this Item to the MailItem. Also I don't how
to add the control "To" (textbox) to the recipients of this MailItem.
Here is my code maybe you could help me!
tanks
sub cmbSend_Click()
Set objOA = CreateObject("Outlook.Application"
Set objObject = objOA.CreateItem(olContactItem)
Set objThisPage = Item.GetInspector.ModifiedFormPages("CustomerForm"
Set colControls = objThisPage.Controls
Set objMail = objOA.CreateItem(olMailItem)
objMail.Attachments.Add Item
'objMail.Recipients = colControls("txtTo"
'objMail.Recipients.Add "michelc@biotonix.com"
objMail.To = colControls("txtTo"
objMail.Subject = colControls("txtSubject"
objMail.Send
end sub
I customized a Contact form,I add a lot of fields on it like "To", "Subject" fields
and a button. On the click event of this button I want to send this Item(the contact form
that I modified). But I don't know how to add this Item to the MailItem. Also I don't how
to add the control "To" (textbox) to the recipients of this MailItem.
Here is my code maybe you could help me!
tanks
sub cmbSend_Click()
Set objOA = CreateObject("Outlook.Application"
Set objObject = objOA.CreateItem(olContactItem)
Set objThisPage = Item.GetInspector.ModifiedFormPages("CustomerForm"
Set colControls = objThisPage.Controls
Set objMail = objOA.CreateItem(olMailItem)
objMail.Attachments.Add Item
'objMail.Recipients = colControls("txtTo"
'objMail.Recipients.Add "michelc@biotonix.com"
objMail.To = colControls("txtTo"
objMail.Subject = colControls("txtSubject"
objMail.Send
end sub