J
jec
Hi
1.. Is it possible to modify your macro Greg for 2003/2007 file extensions? I work with doc extensions turned on for clarity. At a minimum I use "doc", "docx" and "docm".
2.. Is it possible to both assign the current file name to the "Subject" property as well as renaming documents sequentially?
Sub BacthFileRenamerSeqNumber()
'Compiled by Greg Maxey
Dim MyFile As String
Dim PathToUse As String
Dim Counter As Long
Dim i As Long
Dim myString As String
'Specify folder containing files
PathToUse = "C:\Batch Folder\"
'Reset counter
Counter = 0
'Count files
MyFile = Dir$(PathToUse & "*.doc")
Do While MyFile <> ""
'Get the next file name
MyFile = Dir$
Counter = Counter + 1
Loop
myString = InputBox("Enter your desired sequence template e.g., My file number")
MyFile = Dir$(PathToUse & "*.doc")
For i = 1 To Counter
Name MyFile As PathToUse & myString & " " & Format(i, "0800#") & ".doc"
'Get the next file name
MyFile = Dir$
Next i
End Sub
1.. Is it possible to modify your macro Greg for 2003/2007 file extensions? I work with doc extensions turned on for clarity. At a minimum I use "doc", "docx" and "docm".
2.. Is it possible to both assign the current file name to the "Subject" property as well as renaming documents sequentially?
Sub BacthFileRenamerSeqNumber()
'Compiled by Greg Maxey
Dim MyFile As String
Dim PathToUse As String
Dim Counter As Long
Dim i As Long
Dim myString As String
'Specify folder containing files
PathToUse = "C:\Batch Folder\"
'Reset counter
Counter = 0
'Count files
MyFile = Dir$(PathToUse & "*.doc")
Do While MyFile <> ""
'Get the next file name
MyFile = Dir$
Counter = Counter + 1
Loop
myString = InputBox("Enter your desired sequence template e.g., My file number")
MyFile = Dir$(PathToUse & "*.doc")
For i = 1 To Counter
Name MyFile As PathToUse & myString & " " & Format(i, "0800#") & ".doc"
'Get the next file name
MyFile = Dir$
Next i
End Sub