自动对所有现有文档和新文档运行宏
我有一个用作者和日期创建页脚的宏,但是我需要这个宏自动运行到所有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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将您的宏文件另存为 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.
将其作为 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.