Word 2003 template -No security warning for High level.

P

pareshtrivedi

I have a template file named mytemplate.dot located in "D:\my_dir" with
digitally signed macros in it which includes my company's certified
(verified by veriSign).
I am setting Macro Security setting to High in the MS word application.
If I manually create a new document file by right clicking on the
mytemplate.dot file, word issues me 'Security Warning' window to either
disable or enable the macros. It also shows the valid signor
certificate. If I open the existing word file (test.doc) located in the
same directory as template then I get the same warning window. This
works fine.
However, if I open the same word file using below command the word file
opens up without any security warning. Also, all the macros are enabled
and I can run them without any warning. In Trusted Publisher tab I
don't see my company's name. Isn't this a security risk?

Dim lword_document As Word.Document
Dim lword_app As Word.Application

Set lword_app = CreateObject("word.application")

lword_app.Visible = 1

Set lword_document = lword_app.Documents.Open("D:\my_dir\test.doc",
Visible = True)

What code do I need to write so that word works exactly the same way as
I open the word document manually?
 
C

Cindy M -WordMVP-

What code do I need to write so that word works exactly the same way as
I open the word document manually?
Take a look at the Application.AutomationSecurity in the Word object
model Help files.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

pareshtrivedi

Thanks that works in office 2003 machine.
Is there any equivalent command in Office 2000? If I open the same word
file in office 2000 machine with High security level, I get no option
for security warning. Only message box which says 'The macros in this
project are disabled. Please refer to ....'
 
C

Cindy M -WordMVP-

Thanks that works in office 2003 machine.
Is there any equivalent command in Office 2000? If I open the same word
file in office 2000 machine with High security level, I get no option
for security warning. Only message box which says 'The macros in this
project are disabled. Please refer to ....'
No, this option was introduced in Word 2002 (Office XP). There is no
equivalent for earlier versions. Those requiring higher security (you ask
whether this isn't a security risk) need to update to a later version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top