在 Outlook 2010 中创建文件夹

Creating folders in Outlook 2010

我的桌面上有一个包含许多子文件夹的文件夹,我需要在 Outlook 2010 中重新创建这些文件夹。这些文件夹是空的,我将其作为模板。大约有 400 个文件夹,所以我尽量避免在 Outlook 中手动创建每个文件夹。

我遇到的问题是这些文件夹没有放在我的收件箱下,它们将创建在我的同事可以访问的公共邮箱下。我们将其用于存档目的。我发现的大多数代码都是用于在收件箱下创建文件夹的。

我该如何在这个 public 邮箱下重新创建目录?我在 VBA 编程方面的经验很少。我还在 excel 中提供了所有文件夹名称,如果这样可以更轻松地完成此操作。

在此先感谢您的帮助。

嗯,我建议从文件夹 class 的 Getting Started with VBA in Outlook 2010 article in MSDN to learn the basics. From the Outlook object model there is no difference where the folder is located. The Add 方法开始,在文件夹集合中创建一个新文件夹。

您可以使用命名空间的 Stores property of the Namespace class which returns a Stores collection object that represents all the Store objects in the current profile. Also the GetSharedDefaultFolder 方法 class returns 表示指定用户的指定默认文件夹的文件夹对象。