N
NakedJ
I use Outlook 2002 and have written a macro to save e-mails on a
location on the hard drive. It works (mostly), but when I try to run
it on a larger group of files, it doesn't save all of the files.
We take care of same-name e-mails as a business process, so that does
not explain the emails that won't save. (I am trying to automate the
same-name e-mail problem as well, but that's a seperate issue.)
Here is the code:
On Error Resume Next
Randomize
iMsgCnt = 0
For Each sMsg In cf.Items
If sMsg.GetInspector.EditorType = olEditorWord Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".RTF",
olRTF
ElseIf sMsg.GetInspector.EditorType = olEditorText Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".txt",
olTXT
ElseIf sMsg.GetInspector.EditorType = olEditorRTF Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".RTF",
olRTF
Else: sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) &
".HTML", olHTML
End If
What am I missing?
location on the hard drive. It works (mostly), but when I try to run
it on a larger group of files, it doesn't save all of the files.
We take care of same-name e-mails as a business process, so that does
not explain the emails that won't save. (I am trying to automate the
same-name e-mail problem as well, but that's a seperate issue.)
Here is the code:
On Error Resume Next
Randomize
iMsgCnt = 0
For Each sMsg In cf.Items
If sMsg.GetInspector.EditorType = olEditorWord Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".RTF",
olRTF
ElseIf sMsg.GetInspector.EditorType = olEditorText Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".txt",
olTXT
ElseIf sMsg.GetInspector.EditorType = olEditorRTF Then
sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) & ".RTF",
olRTF
Else: sMsg.SaveAs MyOrt & StripChars(sMsg.Subject) &
".HTML", olHTML
End If
What am I missing?