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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update all word documents at the same time

Status
Not open for further replies.

debful

Technical User
Nov 10, 2002
46
AU
I'm trying to think of a way of storing a document in several places but having them linked so that either it can only be updated in one place or else updates anywhere flow into the other stored copies?

Any thoughts on a solution? I posted this into the word forum but someone suggested posting it onto the VBA forum.

Cheers
debful
 
How about creating shortcuts in additional locations that all point to the "master" template?
That way the document can be accessed from whatever location you want but only a single version really exists?
 
This was setup a couple of years ago as I got tired of opening Word Templates and updating the links. Create a macro and and call it AutoOpen, change the path and file names.

Dim TrkStatus As Boolean
Dim oRange As Object
Dim fs

Set fs = CreateObject("Scripting.FileSystemObject")

If fs.FileExists("C:\path\To.dot") Then
ChangeFileOpenDirectory "C:\path\"
Documents.Open FileName:="""To.dot"""
With ActiveDocument
TrkStatus = .TrackRevisions
.TrackRevisions = False
For Each oRange In .StoryRanges
Do
oRange.Fields.Update
Set oRange = oRange.NextStoryRange
Loop Until oRange Is Nothing
Next
.TrackRevisions = TrkStatus
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
End If
 
I think you need to specify the requirements in more detail.

This is the same document in various places? The same document that could be changed differently from various locations? That does not sound like a great idea in general.

What, exactly, is being updated? Fields? Could these be INCLUDETEXT, or INCLUDEPICTURE types?

faq219-2884

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

Part and Inventory Search

Sponsor

Back
Top