delphi获取OutLook相关电话本资料

时间:2010-01-27 09:04:16  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读::= CreateOleObject('Outlook.Application');     MyNameSpace := MSOutlook.GetNameSpace('MAPI');     MyFolder := MyNamespace.GetDefaultFolder(olFolderContacts);     for i := 1 to MyFolder.Items.Count do begin       s := s + #13#13'Contact No: ' + In...
  正文:

procedure TForm1.Button3Click(Sender: TObject);
var
MSOutlook, MyNameSpace, MyFolder, MyItem: Variant;
s: string;
i: Integer;
begin
  try
    MSOutlook := CreateOleObject('Outlook.Application');
    MyNameSpace := MSOutlook.GetNameSpace('MAPI');
    MyFolder := MyNamespace.GetDefaultFolder(olFolderContacts);
    for i := 1 to MyFolder.Items.Count do begin
      s := s + #13#13'Contact No: ' + IntToStr(i) + #13#13;
      MyItem := MyFolder.Items[i];
      s := s + 'BillingInformation: ' + MyItem.BillingInformation + #13;
      s := s + 'Body: ' + MyItem.Body + #13;
      s := s + 'Categories: ' + MyItem.Categories + #13;
      s := s + 'Companies: ' + MyItem.Companies + #13;
      s := s + 'CreationTime: ' + DateTimeToStr(MyItem.CreationTime) + #13;
      s := s + 'EntryID: ' + MyItem.EntryID + #13;
      s := s + 'Importance: ' + IntToStr(MyItem.Importance) + #13;
      s := s + 'LastModificationTime: ' + DateTimeToStr(MyItem.LastModificationTime) + #13;
      s := s + 'MessageClass: ' + MyItem.MessageClass + #13;
      s := s + 'Mileage: ' + MyItem.Mileage + #13;
      s := s + 'NoAging: ' + IntToStr(MyItem.NoAging) + #13;
      s := s + 'OutlookVersion: ' + MyItem.OutlookVersion + #13;
      s := s + 'Saved: ' + IntToStr(MyItem.Saved) + #13;
      s := s + 'Sensitivity: ' + IntToStr(MyItem.Sensitivity) + #13;
      s := s + 'Size: ' + IntToStr(MyItem.Size) + #13;
      s := s + 'Subject: ' + MyItem.Subject + #13;
      s := s + 'UnRead: ' + IntToStr(MyItem.UnRead) + #13;
      s := s + 'Account: ' + MyItem.Account + #13;
      s := s + 'Anniversary: ' + DateTimeToStr(MyItem.Anniversary) + #13;
      s := s + 'AssistantName: ' + MyItem.AssistantName + #13;
      s := s + 'AssistantTelephoneNumber: ' + MyItem.AssistantTelephoneNumber + #13;
      s := s + 'Birthday: ' + DateTimeToStr(MyItem.Birthday) + #13;
      s := s + 'Business2TelephoneNumber: ' + MyItem.Business2TelephoneNumber + #13;
      s := s + 'BusinessAddress: ' + MyItem.BusinessAddress + #13;
      s := s + 'BusinessAddressCity: ' + MyItem.BusinessAddressCity + #13;
      s := s + 'BusinessAddressCountry: ' + MyItem.BusinessAddressCountry + #13;
      s := s + 'BusinessAddressPostalCode: ' + MyItem.BusinessAddressPostalCode + #13;
      s := s + 'BusinessAddressPostoffice/ target=_blank class=infotextkey>OfficeBox: ' + MyItem.BusinessAddressPostOfficeBox + #13;
      s := s + 'BusinessAddressState: ' + MyItem.BusinessAddressState + #13;
      s := s + 'BusinessAddressStreet: ' + MyItem.BusinessAddressStreet + #13;
      s := s + 'BusinessFaxNumber: ' + MyItem.BusinessFaxNumber + #13;
      s := s + 'BusinessHomePage: ' + MyItem.BusinessHomePage + #13;
delphi获取OutLook相关电话本资料》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Language/Delphi/2010-01-27/12458.html

 1/4    1 2 3 4 下一页 尾页


关键字:

关于《delphi获取OutLook相关电话本资料》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td