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.
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
raziel: Delphi-Tags hinzugefügt