http://www.dsdt.info/tipps/?id=608create a new Outlook contact item? { Dieser Tip arbeitet mit D5/D6 und mit Outlook 2000 oder Outlook 98 This Tip works with D5/D6, with Outlook 2000 or Outlook 98 }{$IFDEF SYN_COMPILER_6} uses ComObj, Outlook2000; {$ELSE} uses ComObj, Outlook8; {$ENDIF}procedure NewContactItem; var OutlApp: OutlookApplication; OutlNamespace: Namespace; ContactFolder: MAPIFolder; Contact: ContactItem; begin OutlApp := CoOutlookApplication.Create; OutlNamespace := OutlApp.GetNameSpace('MAPI'); ContactFolder := OutlNamespace.GetDefaultFolder(olFolderContacts); Contact := OutlApp.createitem(olContactItem) as ContactItem; Contact.LastName := 'User'; Contact.FirstName := 'Jack'; Contact.HomeAddressStreet := 'Street'; Contact.HomeAddressCountry := 'Germany'; Contact.HomeAddressPostalCode := '12345'; Contact.HomeAddressCity := 'City'; Contact.HomeTelephoneNumber := '+49(0)1239/23903'; Contact.HomeFaxNumber := '+49(0)1239/23904'; Contact.Email1Address := '[email protected]'; Contact.Save; OutlApp := nil; end;procedure TForm1.Button1Click(Sender: TObject); begin NewContactItem; end;
另外,哪位仁兄对操作outLook比较熟悉呀,帮助给一段代码吧
{
Dieser Tip arbeitet mit D5/D6 und mit Outlook 2000 oder Outlook 98
This Tip works with D5/D6, with Outlook 2000 or Outlook 98
}{$IFDEF SYN_COMPILER_6}
uses
ComObj, Outlook2000;
{$ELSE}
uses
ComObj, Outlook8;
{$ENDIF}procedure NewContactItem;
var
OutlApp: OutlookApplication;
OutlNamespace: Namespace;
ContactFolder: MAPIFolder;
Contact: ContactItem;
begin
OutlApp := CoOutlookApplication.Create;
OutlNamespace := OutlApp.GetNameSpace('MAPI');
ContactFolder := OutlNamespace.GetDefaultFolder(olFolderContacts);
Contact := OutlApp.createitem(olContactItem) as ContactItem;
Contact.LastName := 'User';
Contact.FirstName := 'Jack';
Contact.HomeAddressStreet := 'Street';
Contact.HomeAddressCountry := 'Germany';
Contact.HomeAddressPostalCode := '12345';
Contact.HomeAddressCity := 'City';
Contact.HomeTelephoneNumber := '+49(0)1239/23903';
Contact.HomeFaxNumber := '+49(0)1239/23904';
Contact.Email1Address := '[email protected]';
Contact.Save;
OutlApp := nil;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
NewContactItem;
end;
我想再问一下:
就是我有其它格式的数据 想转化(保存)为 Wab格式的或其它的例如cvs的,应怎么做呀?走过的
路过的兄弟帮忙呀