
' Output a 'protected' file report in the document from which the macro is run. vbCr & "Template: " & strPath & " not found for " & strDoc ' Output an error report in the document from which the macro is run. ' If not found, reset the template to 'Normal' AttachedTemplate = NewServer & Mid(strPath, Len(OldServer) + 1) StrPath = NewServer & Mid(strPath, Len(OldServer) + 1) ' Update the file counter for changed files If LCase(Left(strPath, Len(OldServer))) = LCase(OldServer) Then StrPath = Dialogs(wdDialogToolsTemplates).Template ' Store the file's current Date/Time stamp.ĭocuments.Open strDoc, AddToRecentFiles:=False, ReadOnly:=False, Format:=wdOpenFormatAuto OldServer = " \\TSB\VOL1": NewServer = " \\TSLSERVER\Files"

' server paths differ as the OldServer and NewServer variables.ĭim OldServer As String, NewServer As String, strPath As String Simply insert however much of the lower end of the ' This sub updates the template paths for files after a server ' Update the status bar is just to let us know where we areĪpplication.StatusBar = StrFolder & strFileĬall UpdateTemplateRefs(StrFolder & strFile) ' Call ourself to see if there are subfolders below Set oFolder = FSO.GetFolder(strStartPath) If FSO Is Nothing Then Set FSO = CreateObject("Scripting.FileSystemObject") Sub SearchSubFolders(strStartPath As String) If (Not oFolder Is Nothing) Then GetTopFolder = Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0) MsgBox i & " of " & j & " files updated.", vbOKOnly

Dim oSubFolder As Object 'the subfolders collection
