I just ask this question as I do not believe that after so many versions of Word, it wouldn't exist.

Usually when I'm working on a document and I realize I have to rename it, I have to close the document down, go to file explorer and then rename it, and then opening it up again.

It's a procedure that's so ingrained in my usage pattern that I didn't realize until now that I'm actually having to open and close multiple windows/ applications etc. simply to rename a file. Surely, it's the year 2012, I should be able to do a simple thing like that with a few clicks right?

So is there a way to just rename the file name of a word /excel / office document without having to close it first?


Word opens documents in exclusive mode AFAIK, so this locks the files and prevents access by other programs until the lock is released by closing the files or Word itself. I don't think providing shared access to documents is a workable solution, otherwise it would surely have been implemented long back if it made sense.

  • By default, yes, it is exclusive mode and it does cause it to lock the file. There is some difference between exclusive and shared modes in how other users can access and modify the file using the same program, but I'm pretty sure that another program (ie explorer) would still locked out from accessing the file. I think shared mode is more specifically designed with oplocks in mind with multiple users over SMB, not on a local file system with different applications and the same user. I could be wrong though. – MaQleod Dec 12 '12 at 4:31
  • @Karan - thanks, that's the type of answer I was looking for. So there's probably some underlying technical issue that prevents this from being implementing? – RoboShop Dec 12 '12 at 9:42
  • Yes, the fact that Word (or any Office program) has exclusive access to the file is probably to prevent simultaneous updates to the same file from another program, leading to potential data loss. Preventing shared access is therefore most likely the best thing to do in this case, thus leading to the requirement that you need to release the lock on the file before you can perform any other operation on it. – Karan Dec 12 '12 at 17:04
  • This should not be the selected answer as it discusses access by "other programs". The OP's request does not require such access. – kmote Jul 10 '14 at 17:51
  • @kmote: Oh, so File Explorer is not a separate program from Word? – Karan Sep 5 '14 at 23:34

Yes, it's possible!

At least on a Mac (OS X 10.8.5). Just Cmd + click on the file name on top of your opened Office document, that you want to rename. You then see the path where the file is located. Next you click on the name of the folder directly under the file name. The name then appears in a Finder screen, where you can adjust its name to whatever you want.

So no need to first close the file, nor to use 'save as' and removing the first file from the finder! (I don't know if the same or similar trick works out in Windows.)


Prompted by the suggestions of @Adam and @Lưu Vĩnh Phúc, I created the following macro that does what you requested. Note that this will delete any history associated with the file.

      Sub RenameActiveFile()
    ' Renames the current file without closing the document (assuming file has already been saved)
    '  (Actually, saves with new name and deletes previous, so history will be lost).
    Dim strFileFullName, strFileName, strNewName As String
    Dim res As VbMsgBoxResult

    ' Get current name:
    strFileFullName = ActiveDocument.FullName               'for Word docs
    'strFileFullName = ActiveWorkbook.FullName               'for Excel docs
    'strFileFullName = Application.ActivePresentation.FullName       'for Powerpoint presentations*
    If (InStr(strFileFullName, ".") = 0) Then
        res = MsgBox("File has not been saved. Can't rename it.", , "Rename File")
        Exit Sub
    End If
    strFileName = Right(strFileFullName, Len(strFileFullName) - InStrRev(strFileFullName, "\")) 'strip path
    strFileName = Left(strFileName, (InStr(strFileName, ".") - 1))  ' strip extension

    ' Prompt for new name:
    strNewName = InputBox("Rename this file to:", "Rename File", strFileName)
    If (strNewName = "") Or (strNewName = strFileName) Then ' (Check whether user cancelled)
        Exit Sub
    End If

    ' Save file with new name:
    ActiveDocument.SaveAs2 FileName:=strNewName             'for Word docs
    'ActiveWorkbook.SaveAs2 FileName:=strNewName            'for Excel docs
    'Application.ActivePresentation.SaveAs FileName:=strNewName      'for Powerpoint presentations*

    ' Delete old file:
    With New FileSystemObject   ' (this line requires: Tools->References->Microsoft scripting runtime)
        If .FileExists(strFileFullName) Then
            .DeleteFile strFileFullName
        End If
    End With
End Sub

*Note: although this macro works with Powerpoint (with modifications noted above), PowerPoint can't save it globally.


Microsoft has included ground breaking new features in the latest Word designed to accommodate those with your exact concerns -

Click file and then 'Save As'

  • 2
    I doubt that's quite what the OP was looking for. Save As doesn't rename the file, it just saves a new copy under a different name. – Nicole Hamilton Dec 12 '12 at 4:49
  • 4
    @Scandalist : what's with the sarcasm? I thought my question was fairly legitimate. I'm not saying it's a show stopper, I'm just saying that like all small tedious tasks, it requires time and brain power. Office suites are all about making you more productive, so from a user's perspective, I don't understand why it hasn't been implemented. – RoboShop Dec 12 '12 at 9:39
  • @RoboShop, fair enough, if the real problem is productivity then you could quite easily write a macro and add it to the toolbar that prompts for a new file name, saves and closes the active document, renames the document and finally opens the renamed document. This achieves the task in hand with the "click of a button". – Adam Dec 14 '12 at 13:22
  • this should be the right answer if one needs to rename a file while opening. Just save as the new name and then delete the old file – phuclv Nov 13 '13 at 0:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.