What can go after Recipients.Add?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a button on it to send an email. When I get to the line
where I address it, I don't know what to put after "Recipients.Add."

The whole line reads: Set objOutlookRecip = .Recipients.Add

Michael Heiter
 
Hi Michael

Like this:
Set objOutlookRecip = .Recipients.Add(strRecipient)

where strRecipient is a string in one of the following forms:
name in address book: "Mickey Mouse"
email address: "(e-mail address removed)"
display name + address: "Donald Duck <[email protected]>"

You can then set other properties of the recipient that you have added. For
example:
objOutlookRecipient.Type = olCC ' add to the CC list

Or you can call methods on the recipient object, such as:
objOutlookRecipient.Resolve
This will check the validity of the email address (if supplied) or look up
the name in the address book.
 
Back
Top