Autor Beitrag
schaumermal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Mi 26.04.06 14:00 
Hallo,

wer kann mir sagen, warum der folgende Code immer die Meldung "Die Methode FirstName wird vom Automatisierungsobjekt nicht unterstützt" angezeigt.

Ich möchte mit dieser Abfrage feststellen ob ein gewisser Kontakt aus Vorname und Nachname in Outlook existiert.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
const
  olFolderContacts = $0000000A;
var
  outlook, NameSpace, Contacts, Contact: OleVariant;
  i: Integer;
begin
  outlook := CreateOleObject('Outlook.Application');
  NameSpace := outlook.GetNameSpace('MAPI');
  Contacts := NameSpace.GetDefaultFolder(olFolderContacts);

  Contact := Contacts.Items.Restrict('[FirstName] = ''Peter''');

  ShowMessage(Contact.FirstName);

  Outlook := UnAssigned;
end;



Gruß

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt
schaumermal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Do 27.04.06 20:45 
Hat hierzu wirklich niemend eine Idee?