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

查看:378
本文介绍了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%\ Microsoft \ Outlook文件夹中的一个名为VbaProject.otm的文件中,该文件在大多数系统上将是隐藏的文件夹.

All Outlook macros are stored in a single file named VbaProject.otm in the user's %appdata%\Microsoft\Outlook 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天全站免登陆