AutoOpen macro causing VBA to open

P

Phrank

Hi,

I've got an AutoOpen macro that forces all of my documents to open in
Final mode of Track Changes. It works GREAT! There is one minor
problem though. For some reason, with this added to my Normal.dot
template, everytime my computer times out and goes to the Windows lock
screen, when I log back on, VBA opens up to this macro. The macro is
below. Why is that?

Sub AutoOpen()
' Open track changes toolbar
CommandBars("Reviewing").Visible = True
' Make the document open in Final track changes mode
With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
.Type = wdPrintView 'select page/print layout view
'Alternative to the above line if normal view is preferred
'.Type = wdNormalView
.Zoom.Percentage = 100 'set the display zoom to 100%
End With
' Open Outline toolbar
CommandBars("Outlining").Visible = True
End Sub
 
J

Jezebel

Are you saying that Word re-runs this macro every time you log on, or that
VBA *displays* the macro code?
 
J

Jean-Guy Marcil

Jezebel was telling us:
Jezebel nous racontait que :
Are you saying that Word re-runs this macro every time you log on, or
that VBA *displays* the macro code?

I think he means that the VBE window opens up when the computer is awakened
after a period of sleep.

From time to tome, this also happens on my system. But, my system is old and
falling apart... so it does not surprise me that something weird happens. I
thought I was the only one...Now I am curious as it happens elsewhere...
I have no idea why it does happen. Maybe the OP has got something regarding
Normal.dot.... My Normal.dot does have some macros in it (No AutOpen or any
Auto type of macros though, just some unimportant scratch/test macros).

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
P

Phrank

Yes, the VBE window opens up (just like pressing Alt+F11 when Word is
open). This isn't an old system either; this is the system at work,
and we have about 1000 employees and a top notch IT department
(although, with 1000 employees, they don't have time to mess with my
dinky VBA issue). Now, I do have other macros in the NewMacros module
under the Normal.dot template, but this is the only AutoOpen or any
other Auto type of macro.

Frank
 

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