방법: Outlook 연락처에 엔트리 추가

이 예제에서는 새 연락처를 만들고 새 연락처에 데이터를 입력합니다.

적용 대상: 이 항목의 정보는 Outlook 2007 및 Outlook 2010의 응용 프로그램 수준 프로젝트에 적용됩니다. 자세한 내용은 Office 응용 프로그램 및 프로젝트 형식에 따라 사용 가능한 기능을 참조하십시오.

예제

Private Sub AddContact()
    Dim newContact As Outlook.ContactItem = Me.Application.CreateItem(Outlook. _
        OlItemType.olContactItem)
    Try
        With newContact
            .FirstName = "Jo"
            .LastName = "Berry"
            .Email1Address = "somebody@example.com"
            .CustomerID = "123456"
            .PrimaryTelephoneNumber = "(425)555-0111"
            .MailingAddressStreet = "123 Main St."
            .MailingAddressCity = "Redmond"
            .MailingAddressState = "WA"
            .Save()
            .Display(True)
        End With
    Catch
        MsgBox("The new contact was not saved.")
    End Try
End Sub
private void AddContact()
{
    Outlook.ContactItem newContact = (Outlook.ContactItem)
        this.Application.CreateItem(Outlook.OlItemType.olContactItem);
    try
    {
        newContact.FirstName = "Jo";
        newContact.LastName = "Berry";
        newContact.Email1Address = "somebody@example.com";
        newContact.CustomerID = "123456";
        newContact.PrimaryTelephoneNumber = "(425)555-0111";
        newContact.MailingAddressStreet = "123 Main St.";
        newContact.MailingAddressCity = "Redmond";
        newContact.MailingAddressState = "WA";
        newContact.Save();
        newContact.Display(true);
    }
    catch
    {
        MessageBox.Show("The new contact was not saved.");
    }
}

참고 항목

작업

방법: 약속 만들기

방법: Outlook 연락처 액세스

방법: 연락처에서 전자 메일 주소 검색

개념

연락처 항목 작업