Code to always open a document in Final mode (track changes)

P

Phrank

Hello,

We are usiing MS Word 2003 XP at work, and all of my colleagues and I
hate that documents always open in track changes mode (with markup
showing). I've written a small AutoOpen macro that works perfectly
fine on my computer, but from my reading on the subject, I can
accomplish the same thing with a Document_Open macro. I tried this,
but everytime I open a document, VBA opens, and I get an error
message. Here's the code and the error message:

Error message: Object variable or With Block variable not set


Private Sub Document_Open()

With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
End With

End Sub

The reason I want to do it this way is because I believe it will be
easier for me to share this with my colleagues. The other way,
everyone has to go into VBA or I have to do it, and not everyone is
comfortable with that, and I don't have the time to do everyone's
computer. Thanks for any help or advice.

Frank
 
D

Doug Robbins - Word MVP

Create a template that contains your AutoOpen macro and save it, and have
your colleagues save it in the Word\Startup folder. It will then be treated
as an add-in that will run automatically when all documents are opened.

The Word Startup folder is usually located at

c:\Documents and Settings\[user name]\Application
Data\Microsoft\Word\Startup

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jezebel

There's another startup folder at C:\Program Files\Microsoft
Office\Office[version]\Startup -- functions the same way but works for all
users on the computer.




Doug Robbins - Word MVP said:
Create a template that contains your AutoOpen macro and save it, and have
your colleagues save it in the Word\Startup folder. It will then be
treated as an add-in that will run automatically when all documents are
opened.

The Word Startup folder is usually located at

c:\Documents and Settings\[user name]\Application
Data\Microsoft\Word\Startup

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Phrank said:
Hello,

We are usiing MS Word 2003 XP at work, and all of my colleagues and I
hate that documents always open in track changes mode (with markup
showing). I've written a small AutoOpen macro that works perfectly
fine on my computer, but from my reading on the subject, I can
accomplish the same thing with a Document_Open macro. I tried this,
but everytime I open a document, VBA opens, and I get an error
message. Here's the code and the error message:

Error message: Object variable or With Block variable not set


Private Sub Document_Open()

With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
End With

End Sub

The reason I want to do it this way is because I believe it will be
easier for me to share this with my colleagues. The other way,
everyone has to go into VBA or I have to do it, and not everyone is
comfortable with that, and I don't have the time to do everyone's
computer. Thanks for any help or advice.

Frank
 
P

Phrank

Thank you both! I will do that.

There's another startup folder at C:\Program Files\Microsoft
Office\Office[version]\Startup -- functions the same way but works for all
users on the computer.




Doug Robbins - Word MVP said:
Create a template that contains your AutoOpen macro and save it, and have
your colleagues save it in the Word\Startup folder. It will then be
treated as an add-in that will run automatically when all documents are
opened.

The Word Startup folder is usually located at

c:\Documents and Settings\[user name]\Application
Data\Microsoft\Word\Startup

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Phrank said:
Hello,

We are usiing MS Word 2003 XP at work, and all of my colleagues and I
hate that documents always open in track changes mode (with markup
showing). I've written a small AutoOpen macro that works perfectly
fine on my computer, but from my reading on the subject, I can
accomplish the same thing with a Document_Open macro. I tried this,
but everytime I open a document, VBA opens, and I get an error
message. Here's the code and the error message:

Error message: Object variable or With Block variable not set


Private Sub Document_Open()

With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
End With

End Sub

The reason I want to do it this way is because I believe it will be
easier for me to share this with my colleagues. The other way,
everyone has to go into VBA or I have to do it, and not everyone is
comfortable with that, and I don't have the time to do everyone's
computer. Thanks for any help or advice.

Frank
 
P

Phrank

Hi again Doug,

I did as you instructed, but for some reason, it doesn't work; the
Word files continue to open showing markup. I went back the other way
and saved my AutoOpen code to my Normal.dot template again, and once
again, everything worked fine. I hadn't seen what Jezebel wrote about
putting the code in C:\Program Files\Microsoft Office\Office[version]\
Startup, and I'll try that tomorrow, but if putting it in the path
below didn't work, what would make it work in this location? Why
wouldn't it work in this location? I just want to make sure this
works well with my computer before I forward it on to others. Thanks.
 

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