自动对所有现有文档和新文档运行宏

发布于 2024-08-21 00:58:48 字数 97 浏览 3 评论 0原文

我有一个用作者和日期创建页脚的宏,但是我需要这个宏自动运行到所有Word文档(现有的和新的文档),只需打开我之前保存的Word文件或新的Word文件,这样我们就可以在记录我创建的宏

I have macro that create the footer with author and date, but I need this macro to automatically run to all word document (existing and the new document) just I open the word file which I saved before or the new one so there we find in document the macro that I create

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦亿 2024-08-28 00:58:48

将您的宏文件另存为 Word 插件文件,或将您的宏放入您的 individual.doc 文件中,该文件将可用于所有文件。

save your macro file as a word addin file or put your macro in your personal.doc file and will be available for all files.

少女净妖师 2024-08-28 00:58:48

将其作为 OnCreate 方法存储在 ThisDocument 中(如果我没记错的话,为“Private Sub Document_NewDocument”)。将其另存为Normal.dotm模板,这样它会自动调用它创建的文档。您还可以将其存储为 OnOpen,并从删除页脚开​​始宏 - 这样您打开的所有文档都将获得页脚。

Store it in ThisDocument as OnCreate method ("Private Sub Document_NewDocument" if I remember well). Save it as Normal.dotm template, so it will automatically call it created document. You can also store it as OnOpen, and start your macro from removeing footer - this way all documents you open will get your footer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文