Macros have stopped working

N

Neil Humphries

We have some macros in .dotm files which open a dialog box and then populate
the header and footer of the document. Something has happened so that these
macros no longer run in my profile on my PC. On other accounts on other PCs'
and other accounts on my PC the macros run correctly.

I have AutoOpen macros in other documents that still run correctly for me.
Where do I start to look?

The template has the following ThisDocument macros:
Private Sub Document_New()
If Me.CustomDocumentProperties("HasAddress") = False And
GetSetting("XOfficeTemplates", "Administration", "AdminMode", False) <> True
Then
SelectionInterface.CurrentDoc = Me.Application.ActiveDocument
SelectionInterface.Show
End If
End Sub

Private Sub Document_Open()
If Me.CustomDocumentProperties("HasAddress") = False And
GetSetting("XOfficeTemplates", "Administration", "AdminMode", False) <> True
Then
SelectionInterface.CurrentDoc = Me
SelectionInterface.Show
End If
End Sub

The UserForm has the following:
Private Sub UserForm_Initialize()
'Get Data From XLS
GetData
cmdSave.SetFocus
End Sub

If I put a MsgBox line in these 3 routines, they never display.

In the Trust Center I have enabled all macros and trusted access to the VBA
project object model.

Any suggestions?
 
D

Doug Robbins - Word MVP

SelectionInterface is not a VBA term as far as I know.

IF you run the following macro, what is the result

If Me.CustomDocumentProperties("HasAddress") = False And _
GetSetting("XOfficeTemplates", "Administration", "AdminMode", False) <>
True Then
MsgBox "Conditions met"
Else
MsgBox "Conditions not met"
End If




--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 

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