was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

40 Visitors Online


 
...einen neuen Kontakt in Outlook erzeugen?
Autor: Katja Hoffmann
Homepage: http://www.katjahoffmann.gmxhome.de
[ Tip ausdrucken ]  

Tip Bewertung (4):  
     


{
  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 := 'info@user.com';
  Contact.Save;
  OutlApp := nil;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  
NewContactItem;
end;


 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners