Word 2003 template -No security warning for High level.



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?

.



Relevant Pages

  • Re: Defeating information bars/security warnings in links from Pow
    ... Well, as far as I'm concerned, it's kind of like talking to a brick wall when it comes to Microsoft and "security," but a couple of the MVPs are masochists and keep trying. ... What's new in PowerPoint 2007? ... does work, however, so I'm just going to quickly trigger the security warning ... > the file now opens without the Information bar and its attendant> security ...
    (microsoft.public.powerpoint)
  • Re: Excel 2007 and Macros
    ... reinstall and see if I can reset the Security that way. ... run macros without any warnings. ... There are also settings here but I think these just reflect the settings ... Security warning doesn't appear.....although that's as expected. ...
    (microsoft.public.excel.misc)
  • Re: Macro Dialog Box
    ... If security is Medium, the message box will pop up allowing user to enable ... the workbook still opens but macros won't run. ... For Each sht In ActiveWorkbook.Sheets ...
    (microsoft.public.excel.programming)
  • Re: Enabling macro
    ... > would still want to be asked about enabling macros. ... PPT file you want to open. ... it opens the requested file with no Macro Security warning. ...
    (microsoft.public.powerpoint)
  • Re: Macro security
    ... I copied the file to my C:\drive and the Security Warning dialog now appears ... I tried changing my macro security settings to Low so that the macros ... "Jim Rech" wrote: ... Take a workbook that opens with no warning ...
    (microsoft.public.excel.misc)