Word says macros are disabled but settings show they are enabled

1.3k Views Asked by At

I use Word 2007. I have a Word template that has an AutoNew macro. That macro sets a few document variables and then calls a macro in Normal.dot to do the real work. This was developed in WordBasic (Word 6.0).

Suddenly it doesn't work anymore...

Public Sub MAIN()
    ' This is an Auto-numbering document.
    '
    WordBasic.SetDocumentVar "DocType", "brf"   'communicate document type
    WordBasic.SetDocumentVar "DocLang", "e"     'communicate document language
    '
    WordBasic.Call "AutoNumDoc"                 ' <-- doesn't work anymore
End Sub

It still worked on 5/17/2017. Macros are enabled. What has changed? Any suggestions?


Update: Actually it complains that

macros in this project are disabled

but WordOptions -> Trust Center -> Macro Options says they are enabled.

1

There are 1 best solutions below

0
Paul Ogilvie On

The problem is not the WordBasic.Call instruction.

The hint was that macros were disbled, even though the Word settings said the were enabled.

The cause is that I moved my templates to a new location so they would be backed-up, but didn't add that path to the Trusted Locations of the Trust Center.