Hi,
I have the following code to save & close a document within Word when the user clicks a command button:
Application.ActiveDocument.Save
Application.ActiveDocument.Close
The save part saves the file to it's original location from where it was opened, is it always guranteed tha thtis is where the document will be saved to or do I have to specify the path name etc. I do not want Word to ask the user if they want to overwrite the original file as I just want to save the file under the same name.
The Application.Close part when the document then goes to close Word asks if you want to save the document which I don't want as I am automatically saving it above how do I stop this.
I just want to automatically save the document and close it without asking the user.
Thanks.
I have the following code to save & close a document within Word when the user clicks a command button:
Application.ActiveDocument.Save
Application.ActiveDocument.Close
The save part saves the file to it's original location from where it was opened, is it always guranteed tha thtis is where the document will be saved to or do I have to specify the path name etc. I do not want Word to ask the user if they want to overwrite the original file as I just want to save the file under the same name.
The Application.Close part when the document then goes to close Word asks if you want to save the document which I don't want as I am automatically saving it above how do I stop this.
I just want to automatically save the document and close it without asking the user.
Thanks.