Hi Guys.
I'm trying to get a code out of an e-mail, move it to another place and then move the mail to a different folder. I don't have any issues with getting the data out. However: Once I return to outlook, things go wrong.
THis is my code:
So: When the WinActivate is triggered, the mail is already selected with a reading pane on the right.
The error I get is:
Error: (0x80041200)
The attempted operation failed. An object could not be found.
Source:Microsoft Outlook
The thing is: I might not have a very standard e-mail setup (I don't know if this is relevant). In my outlook 4 mailboxes are open and this is just one of them. So maybe the error comes from there? Since it's a company system the other mailboxes haven't been added in the regular way via the "Add another account" option, but rather via this route:
File > Account Settings > Account Settings > Double Click on my main account > More Settings > Advanced > and there the other accounts are added.
Hope Somebody can help me out here.
I'm trying to get a code out of an e-mail, move it to another place and then move the mail to a different folder. I don't have any issues with getting the data out. However: Once I return to outlook, things go wrong.
THis is my code:
CODE:
WinActivate "RS MST CRM - CVent Alerts - RS MST CRM"
olApp := ComObject("Outlook.Application")
olNameSpace := olApp.GetNamespace("MAPI")
olFolderInbox := olNameSpace.GetDefaultFolder(6)
olDestFolder := olFolderInbox.Folders("Alerts").Folders("Done")
olEmails := olApp.ActiveExplorer.Selection
olEmails.Item(1).Move(olDestFolder)
So: When the WinActivate is triggered, the mail is already selected with a reading pane on the right.
The error I get is:
Error: (0x80041200)
The attempted operation failed. An object could not be found.
Source:Microsoft Outlook
The thing is: I might not have a very standard e-mail setup (I don't know if this is relevant). In my outlook 4 mailboxes are open and this is just one of them. So maybe the error comes from there? Since it's a company system the other mailboxes haven't been added in the regular way via the "Add another account" option, but rather via this route:
File > Account Settings > Account Settings > Double Click on my main account > More Settings > Advanced > and there the other accounts are added.
Hope Somebody can help me out here.
Statistics: Posted by Coasterfrenzy — Today, 09:56