Solved

send a custom Contact with a MailItem as an attachment

Posted on 2001-06-20
1
258 Views
Last Modified: 2010-04-08
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
0
Comment
Question by:cath11
1 Comment
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 50 total points
ID: 6244837
The ContactItem object exposes a SaveAs method that will allow you to save the item to the file system as an "olMsg".  If you save the contact to a predefined place on the file system, you can use the Attachtement.Add routine.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook Free & Paid Tools
Read this checklist to learn more about the 15 things you should never include in an email signature.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now