Outlook 在哪里存储 VBA 代码文件? [英] Where does Outlook store the VBA code files?

查看:20
本文介绍了Outlook 在哪里存储 VBA 代码文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Outlook 中有一个带有一些电子邮件宏的 VBA 项目 - 但是在 PC 崩溃后它们都消失了,当我按下 Alt+F11 时,我看到的只是一个新的Project1"

I had a VBA project in outlook with a few email macros - but after a PC crash they are all gone and all I see is a fresh 'Project1' when I hit Alt+F11

我不是 VBA 程序员,但有一组用于电子邮件排序等的方便的宏.我不想再次对它们进行编码.任何人都知道代码文件应该在文件系统上的哪个位置,以便我可以挽救代码?

I'm not a VBA programmer, but had a collection of handy macros for email sorting etc. I would not like to have to code them again. Anyone know where the code files should be on the filesystem so that I might rescue the code?

推荐答案

本页 对 Outlook 保存所有内容的位置有一些非常好的见解.它提出以下建议:

This page has some really good insight on where Outlook keeps all its stuff. It suggests the following:

所有 Outlook 宏都存储在用户的 %appdata%MicrosoftOutlook 文件夹中名为 VbaProject.otm 的单个文件中,该文件夹在大多数系统上将是一个隐藏文件夹.

All Outlook macros are stored in a single file named VbaProject.otm in the user's %appdata%MicrosoftOutlook folder, which will be a hidden folder on most systems.

现在,问题是如果您现在看不到它们,那么您可能无法从该位置恢复它们:那里可能有一个空"项目或根本没有项目,但是如果正在备份该文件夹,您或许可以恢复它.

Now, the problem is that if you do not see them now, then you probably won't be able to restore them from that location: there is probably either an "empty" project there or no project at all, but if that folder is being backed up, you might be able to restore it.

展望未来,您可能会考虑定期导出宏,以防再次发生这种情况,通过 VBA IDE(右键单击并选择导出文件...)或使用链接文章中提到的工具之一(如Office 配置文件向导).

Moving forward, you might consider exporting your macros periodically in case this happens again, either through the VBA IDE (right-click and select Export File...) or using one of the tools mentioned in the linked article (like the Office Profile Wizard).

这篇关于Outlook 在哪里存储 VBA 代码文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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