|
RDORecipient object represents a
message recipient.
Returned by:
RDORecipients.Item, Add, AddEx
The example below connects to the
MAPI session used by Outlook, retrieves a message using the entry id of a give
Outlook Object Model message, and prints out all the recipient names.
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Mail = Session.GetMessageFromID(MailItem.EntryID)
for each Recip in Mail.Recipients
debug.print Recip.Name
next |
|
Derived from:
IDispatch
|
|
Properties |
|
Name |
string, read-write. The display name of the recipient
|
|
Address |
string, read-write. The address of the recipient
|
|
Session |
RDOSession, read-only. Returns the parent
MAPI session represented by the RDOSession object
|
|
Parent |
Returns the parent
RDOMail object |
|
AddressEntry |
RDOAddressEntry, read-only. Returns
the address entry corresponding to the resolved recipient. If the
recipient is not resolved (EntryID property is an empty string), this
property returns NULL.
|
|
DisplayType |
Integer, read-only. Returns
an constant that describes the nature of the recipient.
Corresponds to the PR_DISPLAY_TYPE Extended MAPI proprty. |
|
EntryID |
String, read-only. Returns
the hex representation of the recipient's entry id (PR_ENTRYID). Returns
an empty string if the recipient is not resolved. |
|
Index |
Integer, read-only. Returns
the index of the recipient in the parent RDORecipients collection. |
|
Resolved |
Boolean, read-only. Returns
true if the recipient is resolved (i.e. it entry id is present). |
|
Type |
Integer, read-write. The
recipient type - olTo (1), olCC (2), olBCC (3). Corresponds to the
PR_RECIPIENT_TYPE Extended MAPI property. |
|
Fields(PropTag) |
Variant, read-write. Allows
access to the recipient's properties. Note that RDORecipient.Fields() is
different from RDORecipient..AddressEntry.Fields(); it provides access
to the message's recipients table.
PropTag - either a
DASL property name or an in integer Extended MAPI property tag.
CDO named property format (see
CDOLive)
is also supported.
E.g. to
read the PR_EMAIL_ADDRESS property, one can use the following values of the
PropTag parameter:
0x3003001E (integer)
"http://schemas.microsoft.com/mapi/proptag/0x3003001E"(string)
|
PR_EMAIL_ADDRESS = &H3003001E
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Mail = Session.GetMessageFromID(MailItem.EntryID)
for each Recip in Mail.Recipients
'access the display name using the integer property tag
debug.print Recip.Fields(PR_EMAIL_ADDRESS)
'or using the DASL property name
debug.print Recip.Fields("http://schemas.microsoft.com/mapi/proptag/0x3003001E")
next |
AutoResponse |
Returns or sets a String
representing the text of an automatic response for a Recipient.
Read/write. |
|
MeetingResponseStatus |
Returns an OlResponseStatus
constant indicating the overall status of the response to the meeting
request for the recipient. Read-only.
OlResponseStatus can be one of these OlResponseStatus constants.
olResponseAccepted (3)
olResponseDeclined (4)
olResponseNone (0)
olResponseNotResponded (5)
olResponseOrganized (1)
olResponseTentative (2) |
|
TrackingStatus |
Returns or sets an
OlTrackingStatus constant indicating the tracking status for the
recipient. Read/write.
OlTrackingStatus can be one of these OlTrackingStatus constants.
olTrackingDelivered (1)
olTrackingNone (0)
olTrackingNotDelivered (2)
olTrackingNotRead (3)
olTrackingRead (6)
olTrackingRecallFailure (4)
olTrackingRecallSuccess (5)
olTrackingReplied (7) |
|
TrackingStatusTime |
Returns or sets a Date indicating the tracking status date and time for
the recipient. Read/write
|
|
SendRichInfo |
Boolean, read/write.
Determines whether the message recipient will receive the message in the
RTF (TNEF, winmail.dat) format. Sets/retrieves PR_SEND_RICH_INFO
property for the receipient and the MAPI_ONE_OFF_NO_RICH_INFO flag in
the one-off entry id.
When setting this property,
make sure the recipient is resolved (call Resolve or add the
recipient using
RDORecipients.AddEx) to make sure the entry id is available, so that
Redemption can set the MAPI_ONE_OFF_NO_RICH_INFO flag.
Sending in the TNEF format is used when a message has custom MAPI
properties or a custom message class that need to be preserved when an
SMTP recipient receives the message. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Drafts = Session.GetDefaultFolder(olFolderOutbox)
set Msg = Drafts.Items.Add("IPM.Note.SomeCustomForm")
set Recip = Msg.Recipients.Add("dmitry@dimastr.com")
Recip.Resolve
Recip.SendRichInfo = true
Msg.Subject = "true"
Msg.Body = "Test body"
'The following named property along with the
'custom message class (see above) will be preserved
'when the message is received since we are sending in the TNEF format
Msg.Fields("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/85180003")
= 1
Msg.Save
Msg.Send |
|
Methods |
|
Delete |
Removes the recipient from
the parent message recipients collection. the RDORecipient
object becomes invalid. |
|
ExpandDL(Recursive, PrivateDLOnly)
|
Replaces Distribution List list with the members of that list.
If the recipient is not a distribution list, False is returned an no
changes are made.
After the DL is successfully expended, the RDORecipient
object now points to the last recipient added to the recipient list as
the result of the expansion.
You can expand the Distribution Lists recursively and limit the
expansion to only Private Distribution Lists - MAPIPDL Distribution
Lists can only be accessed locally since they do not have an
externally meaningful address and only exist in the context of the store
that contain the corresponding
RDODistListItem object).
If the call is successful (that is, the recipient was a distribution
list and it was successfully expanded), returns true and false
otherwise.
Recursive - variant, optional. If true, expands the
distribution lists recursively.
If not specified, defaults to True.
PrivateDLOnly - variant, optional. If true, only
expands MAPIPDL Distribution Lists that exist on top of the
RDODistListItem objects in the local
store.
|
|
FreeBusy(Start,
MinPerChar, CompleteFormat)
|
Returns a string representing
the availability of the individual user for a period of 30 days from the
start date.
Start-
Required Date. Specifies the date.
MinPerChar - Required
integer. Specifies the length of each time slot in minutes. Default is
30 minutes.
CompleteFormat - Optional Variant
|
set Session =
CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Mail = Session.GetMessageFromID(MailItem.EntryID)
for each Recip in Mail.Recipients
debug.print Recip.FreeBusy(#06/01/2005#, 30, true)
next
|
Resolve(ShowDialog,
ParentWndHandle) |
Attempts to resolve a
Recipient object against the Address Book. Returns True if the object
was resolved, False if it was not.
ShowDialog - boolean,
optional. If true, and the name resolution fails, the method will
display the standard name resolution dialog.
ParentWndHandle -
integer, optional. If ShowDialog is true, the window handle of the
window to be used as the name resolution dialog parent. If not
specified, the current foreground window will be used as the parent. |
|
|