powered by simpleCommunicator - 2.0.57     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / Детали отправителя
1 сообщений из 1, страница 1 из 1
Детали отправителя
    #38625036
Фотография Случайная гостья
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Приветствую всех.
У меня есть процедура, с помощью которой я перебираю письма в папке и сохраняю вложения в определенную папку на диске.
Я могу получить имя отправителя или полный адрес отправителя, но мне нужно из контакта человека в Outlook поле Department.
Отыскала на сайте майкрософт процедуру, которую привожу ниже.
Я ее как только не изучала в дебаггере, но получить отдельно значение поля Department в какую-либо переменную у меня не получается.
Может быть у кого-то будут идеи?.....

Код: vbnet
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
Public Sub DisplaySenderDetails() 
 Dim Explorer As Outlook.Explorer 
 Dim CurrentItem As Object 
 Dim Sender As Outlook.AddressEntry 
 Dim Contact As Outlook.ContactItem 
 
 Set Explorer = Application.ActiveExplorer 
 
 ' Check whether any item is selected in the current folder. 
 If Explorer.Selection.Count Then 
 
 ' Get the first selected item. 
 Set CurrentItem = Explorer.Selection(1) 
 
 ' Check for the type of the selected item as only the 
 ' MailItem object has the Sender property. 
 If CurrentItem.Class = olMail Then 
 Set Sender = CurrentItem.Sender 
 
 ' There is no sender if the item has not been sent yet. 
 If Sender Is Nothing Then 
 MsgBox "There's no sender for the current email", vbInformation 
 Exit Sub 
 End If 
 
 Set Contact = Sender.GetContact 
 
 If Not Contact Is Nothing Then 
 ' The sender is stored in the contacts folder, 
 ' so the contact item can be displayed. 
 Contact.Display 
 
 Else 
 ' If the contact cannot be found, display the 
 ' address entry in the properties dialog box. 
 Sender.Details 0 
 End If 
 End If 
 End If 
End Sub
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / Детали отправителя
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]