Announcement

Collapse
No announcement yet.

MAPI PST-Date erstellen und Kontakte eintragen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MAPI PST-Date erstellen und Kontakte eintragen

    Hallo,

    ich möchte eine neue pst-Date erstellen und in diese Datei Kontakte eintragen. Ich habe mir das wie folgt vorgestellt

    procedure NeuePST;

    var
    Outlook : OleVariant;
    NameSpace : OleVariant;
    ContactsFolder : OleVariant;
    OutlookContact : OleVariant;
    begin
    Outlook := CreateOleObject('Outlook.Application');
    Try
    NameSpace := Outlook.GetNameSpace('MAPI');
    Namespace.AddStore ('Meine.pst');
    Try
    ContactsFolder := NameSpace.Folders.GetLast;
    OutlookContact := ContactsFolder.Items.Add;

    ..ab hier werden die Werte zugewiesen

    OutlookContact.save;
    Finally
    NameSpace.RemoveStore(ContactsFolder);
    End;

    finally
    Outlook := Unassigned;
    End;
    end;


    Die pst-Datei wird erstellt, jedoch kein Kontakt eingetragen. Hat jemand so etwas schon gemacht ?

    MfG Harald
Working...
X