![]() |
#1
|
|||
|
|||
![]() 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 Much thanks for any insite anyone can provide... I have spent a lot of time researching this. Brock |
#2
|
||||
|
||||
![]()
Hi Brock,
No, you can't rename an open file.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hey Paul,
Thanks for the reply... it answers my question! I will use the Kill command after the Name command to delete the old copy of the file. This will serve the same purpose. Thanks again Paul! Brock |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jabberwocky12 | Word VBA | 2 | 10-22-2010 12:23 PM |
![]() |
sfpermits | Outlook | 6 | 07-21-2010 09:56 AM |
linking a word file and an excell file on a macbook pro | Fleur | Office | 0 | 07-14-2010 08:19 PM |
![]() |
praveen_p | PowerPoint | 1 | 05-06-2009 12:42 PM |
![]() |
unit213 | Outlook | 1 | 09-26-2007 08:15 PM |