-
I am creating an Activity form which will contain the name of a standard Word template document. I want to open an instance of word with this document and then let the user save their modified version of it (with a changed name) and record the name and position in my database so that next time they look at that activity on the form, the users amended document will appear.
What is the best way to do this?
-
Hi,
let the user enter the name and location of the new document in your app.
Then use
Code:
Dim objWordApp As Word.Application
Dim objWordDoc As Word.Document
Set objWordApp = New Word.Application
Set objWordDoc = objWordApp.Documents.Add("template.dot")
objWordDoc.SaveAs strNewNameVar, Word.wdFormatDocument
objWordDoc.Close
objWordApp.Quit
Set objWordApp = Nothing
Eventually you want to set objWordApp.Visible = True to show the document instead of just closing Word.
Roger