Announcement

Collapse
No announcement yet.

Outlook-Adressen auslesen

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

  • Outlook-Adressen auslesen

    Hallo

    Ich möchte die Kontakt-Adressen aus dem Outlook auslesen um diese Daten
    dann in mein Programm bzw. Datenbank zu importieren oder exportieren.

    Kann mir jemand Tips geben wie ich dies anstelle(bin noch Anfänger auf diesem Gebiet) oder wo finde ich Hilfen zu diesem Thema??

    MFG
    Steffen

  • #2
    Versuchs mal damit :O)
    <br>
    <PRE>
    var
    aOutlook : _DApplication
    aMapi : NameSpace;
    aContactFolder : MAPIFolder;
    aContactItem : ContactItem;
    iCnt : Integer;
    begin
    aOutlook := CoApplication_.Create;
    try
    aMapi := aOutlook.GetNamespace('MAPI');
    aContactFolder := aMapi.GetDefaultFolder(olFolderContacts);
    for iCnt := 1 to aContactFolder.Items.Count do
    begin
    aContactItem := aContactFolder.Items.Item(iCnt) as ContactItem;
    ListBox1.Items.Add (aContactItem.FirstName+' '+aContactItem.LastName+' '+aContactItem.Email1Address);
    end;
    finally
    aOutlook := nil;
    end;</PRE>

    Comment


    • #3
      Hallo Steffen,<p>
      habe noch eine kleine Ergänzung für dich:<p>Als erstes vergiss die "uses ComObj;" nicht.<p>Zweitens es gibt noch mehr properties:<br><br>
      if you need a birthday, you can retrieve it as DateToStr(Contact.Birthday)<br>

      Any contact item have a lot of properties. See a list (alphabet): <br><br>

      Birthday<br>
      Business2TelephoneNumber <br>
      BusinessAddress <br>
      BusinessAddressCity <br>
      BusinessAddressCountry <br>
      BusinessAddressPostalCode <br>
      BusinessAddressPostOfficeBox <br>
      BusinessAddressState <br>
      BusinessAddressStreet <br>
      BusinessFaxNumber <br>
      BusinessHomePage <br>
      BusinessTelephoneNumber <br>
      CompanyAndFullName <br>
      CompanyMainTelephoneNumber <br>
      CompanyName <br>
      ComputerNetworkName <br>
      Department <br>
      Email1Address <br>
      Email1AddressType <br>
      Email1DisplayName <br>
      Email2Address <br>
      Email2AddressType <br>
      Email2DisplayName <br>
      Email3Address <br>
      Email3AddressType <br>
      Email3DisplayName <br>
      FirstName <br>
      FTPSite <br>
      FullName <br>
      FullNameAndCompany <br>
      GovernmentIDNumber <br>
      Hobby <br>
      Home2TelephoneNumber <br>
      HomeAddress <br>
      HomeAddressCity <br>
      HomeAddressCountry <br>
      HomeAddressPostalCode <br>
      HomeAddressPostOfficeBox <br>
      HomeAddressState <br>
      HomeAddressStree <br>
      HomeFaxNumber <br>
      HomeTelephoneNumber <br>
      Initials <br>
      ISDNNumber <br>
      JobTitle <br>
      Language <br>
      LastName <br>
      LastNameAndFirstName <br>
      MailingAddress <br>
      MailingAddressCity <br>
      MailingAddressCountry <br>
      MailingAddressPostalCode <br>
      MailingAddressPostOfficeBox <br>
      MailingAddressState <br>
      MailingAddressStreet <br>
      MiddleName <br>
      NickName <br>
      OfficeLocation <br>
      OrganizationalIDNumber <br>
      PersonalHomePage<br>
      PrimaryTelephoneNumber <br>
      Profession <br>
      Suffix <br>
      Title <br>
      WebPage <br&gt

      Comment


      • #4
        Und es gibt noch mehr:
        Account Property
        Actions Property
        Anniversary Property
        Application Property
        AssistantName Property
        AssistantTelephoneNumber Property
        Attachments Property
        AutoResolvedWinner Property
        BillingInformation Property
        Birthday Property
        Body Property
        Business2TelephoneNumber Property
        BusinessAddress Property
        BusinessAddressCity Property
        BusinessAddressCountry Property
        BusinessAddressPostalCode Property
        BusinessAddressPostOfficeBox Property
        BusinessAddressState Property
        BusinessAddressStreet Property
        BusinessFaxNumber Property
        BusinessHomePage Property
        BusinessTelephoneNumber Property
        CallbackTelephoneNumber Property
        CarTelephoneNumber Property
        Categories Property
        Children Property
        Class Property
        Companies Property
        CompanyAndFullName Property
        CompanyLastFirstNoSpace Property
        CompanyLastFirstSpaceOnly Property
        CompanyMainTelephoneNumber Property
        CompanyName Property
        ComputerNetworkName Property
        Conflicts Property
        ConversationIndex Property
        ConversationTopic Property
        CreationTime Property
        CustomerID Property
        Department Property
        DownloadState Property
        Email1Address Property
        Email1AddressType Property
        Email1DisplayName Property
        Email1EntryID Property
        Email2Address Property
        Email2AddressType Property
        Email2DisplayName Property
        Email2EntryID Property
        Email3Address Property
        Email3AddressType Property
        Email3DisplayName Property
        Email3EntryID Property
        EntryID Property
        FileAs Property
        FirstName Property
        FormDescription Property
        FTPSite Property
        FullName Property
        FullNameAndCompany Property
        Gender Property
        GetInspector Property
        GovernmentIDNumber Property
        HasPicture Property
        Hobby Property
        Home2TelephoneNumber Property
        HomeAddress Property
        HomeAddressCity Property
        HomeAddressCountry Property
        HomeAddressPostalCode Property
        HomeAddressPostOfficeBox Property
        HomeAddressState Property
        HomeAddressStreet Property
        HomeFaxNumber Property
        HomeTelephoneNumber Property
        IMAddress Property
        Importance Property
        Initials Property
        InternetFreeBusyAddress Property
        IsConflict Property
        ISDNNumber Property
        ItemProperties Property
        JobTitle Property
        Journal Property
        Language Property
        LastFirstAndSuffix Property
        LastFirstNoSpace Property
        LastFirstNoSpaceAndSuffix Property
        LastFirstNoSpaceCompany Property
        LastFirstSpaceOnly Property
        LastFirstSpaceOnlyCompany Property
        LastModificationTime Property
        LastName Property
        LastNameAndFirstName Property
        Links Property
        MailingAddress Property
        MailingAddressCity Property
        MailingAddressCountry Property
        MailingAddressPostalCode Property
        MailingAddressPostOfficeBox Property
        MailingAddressState Property
        MailingAddressStreet Property
        ManagerName Property
        MarkForDownload Property
        MessageClass Property
        MiddleName Property
        Mileage Property
        MobileTelephoneNumber Property
        NetMeetingAlias Property
        NetMeetingServer Property
        NickName Property
        NoAging Property
        OfficeLocation Property
        OrganizationalIDNumber Property
        OtherAddress Property
        OtherAddressCity Property
        OtherAddressCountry Property
        OtherAddressPostalCode Property
        OtherAddressPostOfficeBox Property
        OtherAddressState Property
        OtherAddressStreet Property
        OtherFaxNumber Property
        OtherTelephoneNumber Property
        OutlookInternalVersion Property
        OutlookVersion Property
        PagerNumber Property
        Parent Property
        PersonalHomePage Property
        PrimaryTelephoneNumber Property
        Profession Property
        RadioTelephoneNumber Property
        ReferredBy Property
        Saved Property
        SelectedMailingAddress Property
        Sensitivity Property
        Session Property
        Size Property
        Spouse Property
        Subject Property
        Suffix Property
        TelexNumber Property
        Title Property
        TTYTDDTelephoneNumber Property
        UnRead Property
        User1 Property
        User2 Property
        User3 Property
        User4 Property
        UserCertificate Property
        UserProperties Property
        WebPage Property
        YomiCompanyName Property
        YomiFirstName Property
        YomiLastName Property

        Von:
        http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaol11/html/olobjContactItem.as

        Comment


        • #5
          Hallo Moritz,

          auch von mir besten Danke.

          Grüsse
          Andrea

          Comment

          Working...
          X