Your post has been very helpful. I have the following code which works for one directory:
Sub PointToNormal()
Dim strFilePath As String
Dim strPath As String
Dim intCounter As Integer
Dim strFileName As String
Dim OldServer As String
Dim objDoc As Document
Dim objTemplate As Template
Dim dlgTemplate As Dialog
Dim nServer As Integer
OldServer = InputBox("What is the old path of your template?(full path to file extension)")
nServer = Len(OldServer)
strFilePath = InputBox("What is the folder location that you want to use?")
If Right(strFilePath, 1) <> "\" Then strFilePath = strFilePath & "\"
'strFileName = Dir(strFilePath & "*.doc")
strFileName = InputBox("What is the file extension you are looking for, including the dot?")
Do While strFileName <> ""
Set objDoc = Documents.Open(strFilePath & strFileName)
Set objTemplate = objDoc.AttachedTemplate
Set dlgTemplate = Dialogs(wdDialogToolsTemplates)
strPath = dlgTemplate.Template
If LCase(Left(strPath, nServer)) = LCase(OldServer) Then
objDoc.AttachedTemplate = NormalTemplate
End If
strFileName = Dir()
objDoc.Save
objDoc.Close
Loop
Set objDoc = Nothing
Set objTemplate = Nothing
Set dlgTemplate = Nothing
End Sub
Can you help me set this up to parse subfolders that are contained in the FilePath string?
Any help would be much appreciated!