K
Kris
Hello,
I have a macro that I found online and modified it to my needs but I
am hitting a wall.
The macro saves an attachment from the file and names it using the
subject line. However every subject line starts the same for example
"Department - ". Is there any way when the file is saving to make sure
that isn't included in the file name?
The code I am using for that section is below.
Any help would be appreciated.
Thanks
For Each Item In SubFolder.Items
For Each Atmt In Item.Attachments
If LCase(Right(Atmt.FileName, Len(ExtString))) = LCase
(ExtString) Then
FileName = DestFolder & Item.Subject & ".csv"
Atmt.SaveAsFile FileName
I = I + 1
End If
Next Atmt
Next Item
I have a macro that I found online and modified it to my needs but I
am hitting a wall.
The macro saves an attachment from the file and names it using the
subject line. However every subject line starts the same for example
"Department - ". Is there any way when the file is saving to make sure
that isn't included in the file name?
The code I am using for that section is below.
Any help would be appreciated.
Thanks
For Each Item In SubFolder.Items
For Each Atmt In Item.Attachments
If LCase(Right(Atmt.FileName, Len(ExtString))) = LCase
(ExtString) Then
FileName = DestFolder & Item.Subject & ".csv"
Atmt.SaveAsFile FileName
I = I + 1
End If
Next Atmt
Next Item