I am opening a Word template using the code below.
'file' contains the location and file name of the template.
MyWord = CreateObject("Word.Application")
MyWord.Visible = True
MyWord.Documents.Open(file)
I then fill the word document with the required data and the user either prints the document or saves it.
If he/she saves it, then default directory is where it was opened and it will overwrite the file as the name is still .dot.
How do I make it so that it is saved in a predifined directory with a .doc extension?
You could suggest copying & renaming the file to the required destination first, but if the user just wants to print the file you do not want it copied.
Thanks.
'file' contains the location and file name of the template.
MyWord = CreateObject("Word.Application")
MyWord.Visible = True
MyWord.Documents.Open(file)
I then fill the word document with the required data and the user either prints the document or saves it.
If he/she saves it, then default directory is where it was opened and it will overwrite the file as the name is still .dot.
How do I make it so that it is saved in a predifined directory with a .doc extension?
You could suggest copying & renaming the file to the required destination first, but if the user just wants to print the file you do not want it copied.
Thanks.