PDA

View Full Version : using ActiveInspector to set values?



next
11-09-2010, 02:08 PM
I'm trying to set values for a new Outlook email through COM, from another programming language. I successfully retrieved the handle, but can't find out how to alter the values.

Basically, I need to adjust: To, CC, Subject and Body text for a pre-existent email. What would be the code in VBA?

JP2112
11-16-2010, 12:09 PM
Dim recip As Outlook.Recipient

Set recip = MailItem.Recipients.Add "To"
recip.Type = olTo

Set recip = MailItem.Recipients.Add "CC"
recip.Type = olCC

With MailItem
.Subject = "Your Subject"
.Body = "Your Body"
End With