Question : MS Word Macro - Save on open to specific directory

Hi,

I have a Microsoft Word Document and when I open it I want it to automatically save it to a location specified in the code with the same name as the original.

Is this possble to achieve?

Thanks,

Answer : MS Word Macro - Save on open to specific directory

If yoiu simply save then the active document takes the save file name and you are no longer working on the original so try the following which saves the document, (change "c:\deleteme\" & ActiveDocument.FullName for your saved file name).

Chris

1:
2:
3:
4:
5:
6:
Private Sub Document_Open()
    ActiveDocument.Save
    Application.Documents.Add ActiveDocument.FullName
    ActiveDocument.SaveAs "c:\deleteme\" & ActiveDocument.FullName
    ActiveDocument.Close
End Sub
Random Solutions  
 
programming4us programming4us