开发者

open word template and run autonew from c#

开发者 https://www.devze.com 2022-12-30 00:46 出处:网络
I can open a .dot templat开发者_开发问答e from a hyperlink fine, but it opens read-only and does not run the autonew macro.

I can open a .dot templat开发者_开发问答e from a hyperlink fine,

but it opens read-only and does not run the autonew macro.

Is there a setting or something obvious Im missing?


I'm pretty sure that's a security feature of Word to prevent macro viruses. You could this after the document has been created:

wordobj.Run("autonew");

However, if there are multiple macros loaded called "autonew", then you can't be sure it will run yours.

0

精彩评论

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