D
David Baber
our organization has an application that parses email messages and
places the data into a database. At the moment the email messages are
manually saved to a folder on the network. (The application has no
mail interace). It was fine when we barely had 10 messages a day.
Now there is over 300 emails a day. I tried to use the following
macro:
sub SaveMessages()
Dim objFolder as MAPIFolder
Dim objMessage as MailItem
Set objFolder = Application.Session.PickFolder
For Each objMessage in ObjFolder
objMessage.SaveAs "<network folder>" & objMessage.Subject &
".msg", olMSG
Next
Set objMessage = Nothing
Set objFolder = Nothing
end sub
The following problem(s) occur:
1. The Microsoft Outlook security box keeps coming up. Even after
setting the "Allow Access" to 10 minutes, it comes up after about
every 10 messages.
2. Anything with an RE or FW in the subject causes a blank file to be
created.
3. The following error occurs with some files that have attachments:
Run-time error '-1767702276 (96a300fc)'
The operation failed.
Because of security rules and policies, I can't just download a dll,
or application to use in place of it. This application has begun the
phase for being upgraded, but it has at least a year plan laid out, if
not longer. Any help on improving this macro, or a different one is
much appreciated.
Sincerely,
David Baber
places the data into a database. At the moment the email messages are
manually saved to a folder on the network. (The application has no
mail interace). It was fine when we barely had 10 messages a day.
Now there is over 300 emails a day. I tried to use the following
macro:
sub SaveMessages()
Dim objFolder as MAPIFolder
Dim objMessage as MailItem
Set objFolder = Application.Session.PickFolder
For Each objMessage in ObjFolder
objMessage.SaveAs "<network folder>" & objMessage.Subject &
".msg", olMSG
Next
Set objMessage = Nothing
Set objFolder = Nothing
end sub
The following problem(s) occur:
1. The Microsoft Outlook security box keeps coming up. Even after
setting the "Allow Access" to 10 minutes, it comes up after about
every 10 messages.
2. Anything with an RE or FW in the subject causes a blank file to be
created.
3. The following error occurs with some files that have attachments:
Run-time error '-1767702276 (96a300fc)'
The operation failed.
Because of security rules and policies, I can't just download a dll,
or application to use in place of it. This application has begun the
phase for being upgraded, but it has at least a year plan laid out, if
not longer. Any help on improving this macro, or a different one is
much appreciated.
Sincerely,
David Baber