о нем Dim newContact As
Public Sub WriteToContact(pers As Person) 'Создание нового контакта в Outlook и запись данных о нем Dim newContact As ContactItem Set newContact = myOl.CreateItem(olContactItem) 'newContact.Display With newContact .BirthDay = pers.DOB .FirstName = pers.FirstName .MiddleName = pers.MiddleName .LastName = pers.LastName .BusinessFaxNumber = pers.Fax .BusinessTelephoneNumber = pers.Tel .BusinessAddress = pers.Address .Email1Address = pers.Email .JobTitle = pers.Post .Save End With ' newContact.Save 'Включить предупреждение о дне рождения Dim myFolder As MAPIFolder Dim newAppointment As Object Set olNameSpace = myOl.GetNamespace("MAPI") Set myFolder = olNameSpace.GetDefaultFolder(olFolderCalendar) Set newAppointment = myFolder.Items(myFolder.Items.Count) With newAppointment .ReminderSet = True .ReminderMinutesBeforeStart = 1440 .Save End With End Sub |
Листинг 2.35. |
Закрыть окно |