VBA code to name a document
Hello,
I have a macro for saving a word document to a specific folder and it works great. The only problem is that i dont know how to name the document correctly. the code is below.
Code:
Sub SaveAFile()
Dim path As String
path = "C:\Users\User\Test.docx"
With ActiveDocument
.SaveAs FileName:=path
.Close
End With
End Sub
with this code the document is named Test.docx when its saved to the new folder. I want the document to keep its current name. Can anyone help please.