Quickly check the type of list?

  • Thread starter Thread starter Dennis Brown
  • Start date Start date
D

Dennis Brown

What is the quickest means of checking what list the user is in, Contact, Appointments, Messages, Notes, or Tasks? I want to determine what list without slowing down the process too much with object calls, so what object would be the fastest to check?
My screen reader uses VB code to retrieve data from the Outlook object, so I need to know when the user is in a particular list, and the screen data isn't unique with the Message list. With all the others, the window title has the list's name (i.e. "Tasks - Microsoft Outlook", "Appointments - Microsoft Outlook"), but the Message list has the current folder's name (i.e. "Inbox - Microsoft Outlook", or "List Keepers - Microsoft Outlook"), and the screen reader uses the window's name to determine what text to announce to the blind user.
So I need to at least go to the object model for the Message list.
Any help would be greatly appreciated!
 
Look at the Application.ActiveExplorer.CurrentFolder property (returns
IMAPIFolder object).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What is the quickest means of checking what list the user is in, Contact,
Appointments, Messages, Notes, or Tasks? I want to determine what list
without slowing down the process too much with object calls, so what object
would be the fastest to check?
My screen reader uses VB code to retrieve data from the Outlook object, so I
need to know when the user is in a particular list, and the screen data
isn't unique with the Message list. With all the others, the window title
has the list's name (i.e. "Tasks - Microsoft Outlook", "Appointments -
Microsoft Outlook"), but the Message list has the current folder's name
(i.e. "Inbox - Microsoft Outlook", or "List Keepers - Microsoft Outlook"),
and the screen reader uses the window's name to determine what text to
announce to the blind user.
So I need to at least go to the object model for the Message list.
Any help would be greatly appreciated!
 
Thanks! So it will let me know if it is the mail folder/Message list?

--

Thanks,
Dennis
Look at the Application.ActiveExplorer.CurrentFolder property (returns
IMAPIFolder object).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What is the quickest means of checking what list the user is in, Contact,
Appointments, Messages, Notes, or Tasks? I want to determine what list
without slowing down the process too much with object calls, so what object
would be the fastest to check?
My screen reader uses VB code to retrieve data from the Outlook object, so I
need to know when the user is in a particular list, and the screen data
isn't unique with the Message list. With all the others, the window title
has the list's name (i.e. "Tasks - Microsoft Outlook", "Appointments -
Microsoft Outlook"), but the Message list has the current folder's name
(i.e. "Inbox - Microsoft Outlook", or "List Keepers - Microsoft Outlook"),
and the screen reader uses the window's name to determine what text to
announce to the blind user.
So I need to at least go to the object model for the Message list.
Any help would be greatly appreciated!
 
Yes, you can check either the MAPIFolder.DefaultMessageClass property
("IPM.Note" for the regular messages, "IPM.Contact" for contacts, etc) or
MAPIFolder.DefaultItemType (one of the OlItemType enums).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Thanks! So it will let me know if it is the mail folder/Message list?

--

Thanks,
Dennis
Look at the Application.ActiveExplorer.CurrentFolder property (returns
IMAPIFolder object).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What is the quickest means of checking what list the user is in, Contact,
Appointments, Messages, Notes, or Tasks? I want to determine what list
without slowing down the process too much with object calls, so what object
would be the fastest to check?
My screen reader uses VB code to retrieve data from the Outlook object, so I
need to know when the user is in a particular list, and the screen data
isn't unique with the Message list. With all the others, the window title
has the list's name (i.e. "Tasks - Microsoft Outlook", "Appointments -
Microsoft Outlook"), but the Message list has the current folder's name
(i.e. "Inbox - Microsoft Outlook", or "List Keepers - Microsoft Outlook"),
and the screen reader uses the window's name to determine what text to
announce to the blind user.
So I need to at least go to the object model for the Message list.
Any help would be greatly appreciated!
 
Back
Top