The cells A1 to B5 in excel are :
AAA 1
BBB 2
EEE 5
DDD 4
CCC 3
How to rename the following email files in C:\
AAA
CCC
EEE
as follows:
1
3
5
The cells A1 to B5 in excel are :
AAA 1
BBB 2
EEE 5
DDD 4
CCC 3
How to rename the following email files in C:\
AAA
CCC
EEE
as follows:
1
3
5
Try this.
Please Login or Register to view this content.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
It is regret that the VBA not work.
Please note that the following not work in my excel:
OldName = "C:\Users\DK-01\Desktop\Renaming\CCC"
NewName = "C:\Users\DK-01\Desktop\Renaming\1"
Name OldName As NewName
but the following VBA is OK:
OldName = "C:\Users\DK-01\Desktop\Renaming\CCC.msg"
NewName = "C:\Users\DK-01\Desktop\Renaming\1.msg"
Name OldName As NewName
You didn't mention any extension in your first post (and I don't have a cristal ball), but it's pretty obvious that that's a part of the filename".
Thanks bakerman2.
You're welcome and thanks for rep+.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks