[COM]给定SMTP地址,查找公用文件夹的文件夹路径

编程入门 行业动态 更新时间:2024-10-23 18:27:16
本文介绍了[COM]给定SMTP地址,查找公用文件夹的文件夹路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是COM开发和Outlook的新手,所以请原谅我的无知......

I am new to COM development, and Outlook in general, so please excuse my ignorance...

我试图找出如何获取文件夹对象公共文件夹的传递文件夹。

I am trying to find out how to obtain a folder object for the delivery folder of a Public Folder.

例如,如果您有一个名为"MyPF"的PF,那么在Exchange中就是这样说的。路径设置为"\ MyPF"并且电子邮件地址设置为"MyPF@MyDomain"

So say for example in Exchange, if you have a PF called "MyPF" with the path set to "\MyPF" and the email address set to "MyPF@MyDomain"

在Outlook中,PF的文件夹结构如下所示:

In outlook, the folder structure for the PF would appear like:

Public Folders - <username> +- All Public Folders +- MyPF

所以,我想要的是通过COM来创建一个函数,如果你通过它" ; MyPF@MyDomain"将返回文件夹"公共文件夹\所有公共文件夹\ MyPF"的COM对象。

So, what i would like is some way, via COM, to craft a function that if you pass it "MyPF@MyDomain" would return the COM object for the folder "Public Folders\All Public Folders\MyPF"

理想情况下,此代码应兼容使用Outlook 2007到2016,并使用C#。

Ideally, this code should be compatible with Outlook 2007 through 2016, and using C#.

推荐答案

Hello Clive,

Hello Clive,

您可以使用 Namespace类的 GetDefaultFolder 方法。只需传递 olPublicFoldersAllPublicFolders 值,即可获得Exchange公用文件夹商店中的所有公共文件夹文件夹。然后您就可以了浏览文件夹树并找到你的文件夹。例如,您可以使用 文件夹类的属性r eturns 文件夹 集合代表指定 文件夹 。 请参阅 如何:枚举文件夹代表示例代码。

You can use the GetDefaultFolder method of the Namespace class. Just pass the olPublicFoldersAllPublicFolders value to get the All Public Folders folder in the Exchange Public Folders store.Then you can navigate through the tree of folders and find yours. For example, you can use the Folders property of the Folder class which returns theFolderscollection that represents all the folders contained in the specifiedFolder. See How to: Enumerate Folders for the sample code.

更多推荐

[COM]给定SMTP地址,查找公用文件夹的文件夹路径

本文发布于:2023-10-31 19:02:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546996.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   路径   地址   SMTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!