![]() |
|
#1
|
||||
|
||||
![]()
Hi,
You can use code like the following. I've assumed the names are in your workbook. If they're not, you can modify the code to suit - the basic principles are the same. Note that the Filepath must end with a "\" Code:
Sub RenameFiles() Dim i As Long, Strpath As String Strpath = "Filepath" With ActiveSheet On Error Resume Next For i = 1 To 12 If Dir(Strpath & .Cells(i, 2).Value, vbNormal) <> "" Then Name Strpath & .Cells(i, 2).Value As Strpath & .Cells(i, 1).Value & .Cells(i, 2).Value End If Next End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
i have folder that excel i kept attachment using above code no replace occur |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Rename a Quick Part | sleake | Word | 14 | 10-14-2013 09:21 AM |
Can't rename shared calendars | kenelder | Outlook | 0 | 06-02-2011 07:53 AM |
![]() |
cksm4 | Word VBA | 2 | 02-25-2011 09:29 AM |
![]() |
sfpermits | Outlook | 6 | 07-21-2010 09:56 AM |
![]() |
unit213 | Outlook | 1 | 09-26-2007 08:15 PM |