Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Track changes for Word template only

Status
Not open for further replies.

grinnineddies

Technical User
May 27, 2005
9
US
I have a Word 2002 template which is modified by several users, and is therefore set to track changes.

When users create a Word doc from this template, the document is also set to track changes, which we do not want. I can't figure out how to turn this feature off for the documents created from the template.

We only want to track changes for the template, not the documents created from the template. Any help is greatly appreciated.

Thanks!
 
One possible way would be to have a macro in the template that users would run manually through a keyboard shortcut.

Member- AAAA Association Against Acronym Abusers
 
Ack! You have users modifying a template????

OK...as soon as get over the shuddering thinking about that...this is easy to fix. Put an explicit instruction to make TrackChanges off in any new document.
Code:
 Sub Document_New()
   If ActiveDocument.TrackRevisions = True Then
      ActiveDocument.TrackRevisions = False
   End If
End Sub
This will allow TrackChanges to be active in the template (.DOT) file, but when a new document is cloned, that new document will NOT have TrackChanges active.

Gerry
My paintings and sculpture
 
Oh, I assume you wanted it to be automatic. You could of course have, as xlhelp suggests, a macro that the users used "manually".

Although, um, they could also simply use Tools > Track Changes. It is a toggle. It would turn it off.

Seems better to have it automatic IMO.

Gerry
My paintings and sculpture
 
The templates are protected (Tools > Protect Document > Tracked Changes). When users create/save a word doc from this template, the word doc remains protected, so for the user to toggle Tracked Changes, it require them to first unprotect the document. Not sure if that's normal behavior.

I'd like to try the code, but don't know how/where to enter the code. Can you point me in the right direction?

Thanks!
 
Bleech. I don't like multiple user changing templates...but hey, it is your document.

OK.

1. Open your template (.dot) file.

2. Alt-F11 gets you the VBE (Visual basic Editor).

3. Ctrl-R gets the Project Explorer (if not already displayed).

4. Find the project for your template. It will be in the Project Explorer tree like - Project (filename).

5. Expand the tree for that project until you can see:

Project (template file)
Microsoft Word Objects
ThisDocument

6. Double click ThisDocument. A code module (ThisDocument) will appear.

7. Click the down arrow of the top LEFT dropdown. You will see:

(General)
Document

8. Select Document. A procedure will appear in the code module window.
Code:
Private Sub Document_New()

End Sub

9. Copy the following into that procedure:

If ActiveDocument.ProtectionType = wdAllowOnlyRevisions Then
ActiveDocument.Unprotect Password:="your_password"
End If
If ActiveDocument.TrackRevisions = True Then
ActiveDocument.TrackRevisions = False
End If

It should look like:
Code:
Private Sub Document_New()
If ActiveDocument.ProtectionType = wdAllowOnlyRevisions Then
   ActiveDocument.Unprotect Password:="gerry"
End If
If ActiveDocument.TrackRevisions = True Then
   ActiveDocument.TrackRevisions = False
End If
End Sub
where the password I used was "gerry".

Go back to the template document, save it.

Now...you had better be using a password for your protection...otherwise this is a silly waste of time!

The template file itself retains protected TrackChanges, documents cloned from it will not.

Gerry
My paintings and sculpture
 
Thanks guys for all your help. Unfortunately, after entering the code, I lost the ability to unprotect the document. That option remains greyed out. Made a copy, so no problem. Must move on now to other things.
 
OK. It seems a bit contrary, but then I do not know exactly what you are doing.

The document produced IS unprotected. So, um, the ability to unprotect is irrelevant.

But...whatever.

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top