Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个单词 2003 .Dot 模板,它位于STARTUP用户的文件夹中。
STARTUP
我在这个模板中有一些带有autoexec程序的模块。
autoexec
在其中一个中,我想读取一个 ini 文件。如果我的模板是my.dot,ini 文件将是my.dot.ini.
my.dot
my.dot.ini
在一个autoexec sub, 在一个启动宏中,读取Application.ActiveDocument.AttachedTemplate返回 normal.dot... not my.dot。
autoexec sub
Application.ActiveDocument.AttachedTemplate
如何获取当前执行模板的名称?
您可以通过 ThisDocument.AttachedTemplate 属性访问当前正在执行的模板。