RDOLinks object

 

The Links object contains a set of Link objects representing all items linked to a particular item.
 

 

Returned by:

RDOMail.Links

 

The example below steps through the items in the Tasks folder and, if a task is not complete and the link count is greater than 0, displays the number of contacts linked to the item..

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
Set myItems = Session.GetDefaultFolder(olFolderTasks).Items
For x = 1 To myItems.Count
  Set myItem = myItems.Item(x)
  Set myLinks = myItem.Links
  If (not myItem.Complete) and (myLinks.Count > 0) Then
    Msg = "'" & myItem.Subject & "'" & " has " & myLinks.Count & " links."
    Debug.Print (Msg)
  End If
Next
 

 

Properties

Methods

 


Derived from: IDispatch


Properties


Count

integer, read-only.

Returns the number of links in the Links collection

see above


Methods


Add(Item)

Links a contact item to another item by adding a Link object to the Links collection associated with the latter item.
Item - object representing a contact, e.g. RDOContactItem.

Returns the newly added Link object.

'Adds a contact with a given name to a task

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set ContactToAdd = Session.GetDefaultFolder(olFolderContacts).Items("John Smith")
RDOTask.Links.Add(ContactToAdd)
RDOTask.Save

Clear

Removes all links from the Links collection

 

 

Remove(Index)

Removes a link with a given index from the Links collection

Index - variant. Either an integer (1 through Count) or a string representing the name of the link.

 

 

Item(Index)

Returns a Link object with the given index.

Index - variant. Either an integer (1 through Count) or a string representing the name of the link.