I read a post that said this was possible but I cannot get it to work....
I have tried to change the template in the word documents using the demo version 3.4 of your API with no success. Am I missing something? We really need this tool to fix thousands of word documents that have old server names in them - they take a long time to open because it cannot find the server. What am I missing?
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim docName As String = ofd.FileName
If docName <> Nothing AndAlso docName.Length > 0 Then
Dim etime As DateTime = Now
Dim doc As New Document(docName)
Dim tempPath As String = doc.BuiltInDocumentProperties.Template
tempPath = IO.Path.GetDirectoryName(tempPath)
tempPath = IO.Path.Combine(tempPath, "Normal.dot")
doc.BuiltInDocumentProperties.Template = tempPath
Dim fPath As String = IO.Path.GetDirectoryName(docName)
Dim fName As String = "new" & IO.Path.GetFileName(docName)
Debug.WriteLine("Elapsed time: " & Now.Subtract(etime).Seconds & " seconds")