I have a database of email addresses that are being used for mass email listings.
Now I also have a module that is used for cleaning up invalid email addresses.
the way it works is that I save all bounced emails in a specific folder and then I run that module, that reads every file under that folder and extract the email address from within the text of the file, and then moves that email from the email address field to the Invalid email address field.
below is the code:
s = Dir("F:\Mail\")
While Not s = ""
Set OL = New Outlook.Application
Set Msg = OL.CreateItemFromTemplate("F:\Mail\" & s)
Set OL = Nothing
Set Msg = Nothing
s = Dir
The issue I am encountering now is that the following line of code gets stuck when trying to open certain files, I guess its because of the name..not sure.
"Set Msg = OL.CreateItemFromTemplate(
the error message states "Type mismatch".
for example the following file name gave me that error "Undeliverable Change in Requirements .msg"
while the following file was accepted "Delivery Status Notification (Failure) (151).msg"
any idea how can I solve this issue?
meanwhile I run it with "on error resume next", however indeed I need the program to work for those files as well..