开发者

How to get the template filename which is currently been executed?

开发者 https://www.devze.com 2023-04-12 06:54 出处:网络
I have a word 2003 .Dot template that stands in the STARTUP folder of the user. I have in this template some modules with autoexec procedures.

I have a word 2003 .Dot template that stands in the STARTUP folder of the user.

I have in this template some modules with autoexec procedures.

In one of them, I want to read a ini file. If my template is my.dot, the ini file will be my.dot.ini.

In an autoexec sub, in a startup macro, r开发者_Go百科eading Application.ActiveDocument.AttachedTemplate returns normal.dot... not my.dot.

How can I get the name of the currently executing template ?


You can access the template which is currently executing through the ThisDocument.AttachedTemplate property.

0

精彩评论

暂无评论...
验证码 换一张
取 消