cancel
Showing results for 
Search instead for 
Did you mean: 

Error trying to save email

ChrisHodgson1
Level 4
Hello, We have a process that reads an email from Outlook and saves a hardcopy of the email to the central drive. This has normally worked fine in production, but occasionally the process will fail to save the email due to the following error: System.Runtime.InteropServices.COMException (0x80020009): Could not open the item. Try again. at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at Email___Additional.Save_Email(String sPath, Decimal nFormat, DateTime ReceivedTime, String& sFileName, Boolean& Success, String& Message) In the past we have simply rebooted the machine to see if the problem fixes itself. Sometimes it seems to work again, other times the issue persists. The issue comes from a Code Stage that was written to save emails, but as it works in dev and test, as well as working most of the time in production, we don't think there's an issue with it. Has anyone seen this exception and can provide any advice? Thanks, Chris
3 REPLIES 3

IanKelly
Level 3
Can we see the code stage you are using? We may be able to help that way.

JamesBarrett
Level 4
I am having similar issues with saving emails to a network folder. I am only dealing with one email at a time, and have seen that if you (manually) select an email and Ctrl-C, you can then use Ctrl-V on the network folder to save the email as a .msg file. Obviously this means spying Outlook and Windows Explorer to get this working, which I have already done, so will just be putting it all together to see if that works. May be an option for you (and others) if VB code doesn't work?

ChrisHodgson1
Level 4
Thanks for the responses. We have managed to fix the issue. We only encountered the error when using a shared mailbox so we've since changed this process to pick up emails from a standalone mailbox instead and the problem hasn't reoccurred.