Just putting the finishing touches on my saga to quasi-automate the Tech Support emails here without using Exchange. The last little kink would appear to be saving the answered message to a network folder. The code below works:
Public Sub ToQA()
Dim myFinishedReply As MailItem
Set myFinishedReply = ActiveInspector.CurrentItem
myFinishedReply.SaveAs “N:JebSupport” & myFinishedReply.To & “.msg”, olMSG
MsgBox “Reply Saved! You can close this email without saving.”
Set myFinishedReply = Nothing
End Sub
The only problem is that the folder can only have one support email from any particular email address. The next one that comes in as jeb@example.com overwrites the previous one with that name.
I’ve been trying to use a Time value as the MSG’s name, but I get nasty runtime errors when I try this. Here’s what I’ve kludged in to attempt this…
Dim strTime As String
strTime = Time
myFinishedReply.SaveAs “N:JebSupport” & strTime & “.msg”, olMSG
Are the colons screwing it up? Is the fact that Time() returns a Variant that I’m compelling to be a String hurting me?
Debug.Print shows the time as hh:mm:ss XM format.
Is there some better way to accomplish the same thing? Any pointers will be much appreciated.