Hello,
I am trying to rename the active document using this code:
Code:
Sub RenameFile()
Dim sOldPathName As String
sOldPathName = "G:\DATA\Test.docx"
On Error Resume Next
Name sOldPathName As "G:\DATA\TestWorked.docx"
If Err Then MsgBox Err.Description
End Sub
I get this error: "File/Path access error". Is it not possible to rename a open file?
Much thanks for any insite anyone can provide... I have spent a lot of time researching this.
Brock