Outlook outlook = new Outlook();
try
{
OutlookFolder contactsFolder = outlook.getDefaultFolder(FolderType.CONTACTS);
OutlookDistributionList distributionList = (OutlookDistributionList) contactsFolder.createItem(ItemType.DISTRIBUTION_LIST);
distributionList.setDLName("My distribution list");
// Add a member to the distribution list:
OutlookRecipient recipient = outlook.createRecipient("John Smith");
if(recipient.resolve())
{
distributionList.addMember(recipient);
distributionList.save();
}
else
{
System.out.println("Recipient was not found.");
}
}
finally
{
outlook.dispose();
}
API Reference
| Classic JavaDoc |
Class OutlookDistributionList
java.lang.Object └ com.moyosoft.connector.ms.outlook.item.OutlookItem └ com.moyosoft.connector.ms.outlook.distlist.OutlookDistributionList
Implemented Interfaces:
public class OutlookDistributionList extends OutlookItem implements IAttachmentsContainer
Constructors
public | OutlookDistributionList (com.moyosoft.connector.com.Dispatch dispatch) | |
Methods
void | addMember (OutlookRecipient member) | |
void | addMembers (RecipientsCollection members) | |
void | close (InspectorClose saveMode) | |
createAttachment (java.io.File pAttachmentFile, AttachmentType pType) | ||
getAttachments () | ||
int | getAttachmentsCount () | |
String | getBillingInformation () | |
String | getBody () | |
String | getCategories () | |
int | getCheckSum () | |
String | getCompanies () | |
getConflicts () | ||
String | getConversationIndex () | |
String | getConversationTopic () | |
String | getDLName () | |
getDownloadState () | ||
getFormDescription () | ||
getImportance () | ||
getInspector () | ||
getItemProperties () | ||
getMarkForDownload () | ||
getMember (int index) | ||
int | getMemberCount () | |
String | getMessageClass () | |
String | getMileage () | |
getSensitivity () | ||
int | getSize () | |
String | getSubject () | |
getType () | ||
getUserProperties () | ||
boolean | isAutoResolvedWinner () | |
boolean | isConflict () | |
boolean | isNoAging () | |
boolean | isSaved () | |
boolean | isUnRead () | |
void | removeMember (OutlookRecipient member) | |
void | removeMembers (RecipientsCollection members) | |
void | setBillingInformation (String value) | |
void | setBody (String value) | |
void | setCategories (String value) | |
void | setCompanies (String value) | |
void | setDLName (String value) | |
void | setImportance (ImportanceType value) | |
void | setMarkForDownload (RemoteStatus value) | |
void | setMessageClass (String value) | |
void | setMileage (String value) | |
void | setNoAging (boolean value) | |
void | setSensitivity (SensitivityType value) | |
void | setSubject (String value) | |
void | setUnRead (boolean value) | |
void | showCategoriesDialog () | |
Inherited methods
OutlookItem
copy, create, delete, deleteMapiProperty, deleteMapiProperty, display, display, dispose, equals, getCreationTime, getDispatch, getEntryId, getItemId, getLastModificationTime, getLinks, getMapiProperty, getMapiProperty, getParentFolder, getPropertyAccessor, getType, move, printOut, save, saveAs, saveAs, saveAs, saveAs, setMapiProperty, setMapiProperty
Community comments
Powered by JavaDocPlus