Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-14-2012, 03:03 AM
macropod's Avatar
macropod macropod is offline Rename Files Windows 7 64bit Rename Files Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It would have been easier if you had posted a workbook with sample data to begin with.

Try:
Code:
Sub RenameFiles()
Dim i As Long, Strpath As String
Strpath = "\\geodb-1\f\villages\"
With ActiveSheet
  On Error Resume Next
  For i = 1 To 12
    If Dir(Strpath & .Cells(i, 1).Value, vbNormal) <> "" Then
      Name Strpath & .Cells(i, 1).Value As Strpath & .Cells(i, 2).Value
    End If
  Next
End With
End Sub
Note: you may still have to change Strpath to use a conventional filepath, rather than the network path.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
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
Rename Files Rename File cksm4 Word VBA 2 02-25-2011 09:29 AM
Rename Files Rename Outlook 2003 Contacts Folder sfpermits Outlook 6 07-21-2010 09:56 AM
Rename Files code to save / rename / send attachments unit213 Outlook 1 09-26-2007 08:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft