获取Outlook中所有房间的列表 [英] Get list of all rooms in outlook

查看:282
本文介绍了获取Outlook中所有房间的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一些应用程序,我需要在我的组织中获得所有可用的房间. (在Outlook中打开添加房间"对话框时得到的列表相同) 我假设当我们通过Outlook进行操作时,他可以在某些交换服务器上工作,但问题是,有没有办法将Outlook用作我与交换服务器之间的代理"?

I'm writing some application where I need to get an all available rooms within my organization. (the same list we get while we opening "Add Rooms" dialog in outlook) I assume that while we doing it through outlook he works against some exchange server, the question is is there a way to use outlook as a"proxy" between me to the exchange server?

我对交流一无所知,而对Outlook的互操作却一无所知...

I have no knowledge with exchange, and a little knowledge with outlook's interop...

在此先感谢您的帮助.

Thanks in advance for any help.

推荐答案

我不知道这是否对您有用,但请使用

I don't know if this will work for you, but looking at the "All Rooms" container with OutlookSpy, the PR_CONTAINER_FLAGS property contains an undocumented bit 0x200. I do not see the same bit set for any other containers. Does something like the following work for you?

PR_CONTAINER_FLAGS = "http://schemas.microsoft.com/mapi/proptag/0x36000003"
set rooms = Nothing
set lists = Application.Session.AddressLists
for each list in lists
  containerFlags = list.PropertyAccessor.GetProperty(PR_CONTAINER_FLAGS)
  if (containerFlags And &H0200) <> 0 Then
    set rooms = list
    Exit For
  End If
next
if (rooms Is Nothing) Then
  MsgBox "Room container not found"
Else
  MsgBox "Room container was found, its name is " & rooms.Name
  for each room in rooms.AddressEntries
     Debug.Print room.Name & " - " & room.Address
   next
End If

这篇关于获取Outlook中所有房间的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆