Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phrank - 02 Apr 2006 02:31 GMT
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
Doug Robbins - Word MVP - 02 Apr 2006 07:36 GMT
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

Signature

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

> Hello,
>
[quoted text clipped - 24 lines]
>
> Frank
Jezebel - 02 Apr 2006 08:27 GMT
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.

> 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
[quoted text clipped - 34 lines]
>>
>> Frank
Phrank - 02 Apr 2006 14:05 GMT
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
[quoted text clipped - 38 lines]
>>>
>>> Frank
Phrank - 04 Apr 2006 03:18 GMT
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.

>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
[quoted text clipped - 4 lines]
>c:\Documents and Settings\[user name]\Application
>Data\Microsoft\Word\Startup
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.