G
Guest
I am working on a macro that saves messages to a folder if the subject
contains certain text. This becomes a problem with RE:, FW:, and any special
characters like /. What could I add to my code that would check for invalid
characters and replace them with "-"?
Here is a small portion of my code:
Dim Item As Object
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
For Each Item In Inbox.Items
If InStr(Item.subject, "test") > 0 Then
Item.SaveAs ("c:\mailtest\" & Item.subject) & ".msg", 3
End If
contains certain text. This becomes a problem with RE:, FW:, and any special
characters like /. What could I add to my code that would check for invalid
characters and replace them with "-"?
Here is a small portion of my code:
Dim Item As Object
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
For Each Item In Inbox.Items
If InStr(Item.subject, "test") > 0 Then
Item.SaveAs ("c:\mailtest\" & Item.subject) & ".msg", 3
End If