Moving unread mails from inbox into a subfolder in inbox
-
HI.. Im trying to move mails that have come into my inbox, that have a specific subject into a subfolder in my inbox. Im trying to do this using a c# application. Ive been working on this the whole day, cant seem to get it. Also whenever i use the Folder.Folders methods i get a 'Microsoft.Office.Interop.Outlook.MAPIFolder.Folders' is a property but is used like a method error. this is how i use it: Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders("Requests"); Thanks
-
HI.. Im trying to move mails that have come into my inbox, that have a specific subject into a subfolder in my inbox. Im trying to do this using a c# application. Ive been working on this the whole day, cant seem to get it. Also whenever i use the Folder.Folders methods i get a 'Microsoft.Office.Interop.Outlook.MAPIFolder.Folders' is a property but is used like a method error. this is how i use it: Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders("Requests"); Thanks
Change
Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders("Requests");
to
Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders["Requests"];
Deja View - the feeling that you've seen this post before.
-
Change
Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders("Requests");
to
Subfolder = namespace_.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox).Folders["Requests"];
Deja View - the feeling that you've seen this post before.
Thank you!!! IT WORKS.. IT WORKS.. IT WORKS. been struggling with it for days. heres why i needed it: i have a web app which sends 'requests' these requests are than saved to a database and sends an email to the administrator notifying them that a new request has come in. now the problem was that in my desktop app i used a timer to check inbox every couple of seconds.. and each time it would read the same message and say there is a new messge. so just wanted to move the request into their own folder so that when the inbox is checked there shouldnt be any new request as they would be in their own folder. didnt want to mark them as unread!! (hope this makes sense ;P ).
-
Thank you!!! IT WORKS.. IT WORKS.. IT WORKS. been struggling with it for days. heres why i needed it: i have a web app which sends 'requests' these requests are than saved to a database and sends an email to the administrator notifying them that a new request has come in. now the problem was that in my desktop app i used a timer to check inbox every couple of seconds.. and each time it would read the same message and say there is a new messge. so just wanted to move the request into their own folder so that when the inbox is checked there shouldnt be any new request as they would be in their own folder. didnt want to mark them as unread!! (hope this makes sense ;P ).
It does make sense. Could you not have used an Inbox rule to accomplish the same thing?
Deja View - the feeling that you've seen this post before.
-
It does make sense. Could you not have used an Inbox rule to accomplish the same thing?
Deja View - the feeling that you've seen this post before.
-
if i were using an inbox rule.. wouldnt i have had to go directly into outlook and make the rule? if so, thats what i was trying to avoid! whats the point of coding than? just wanted everything to be done without me going into outlook.
My bad - for some reason, I was thinking you could do this with Exchange - but I can't find anything in there. Oh well - curse my faulty memory.
Deja View - the feeling that you've seen this post before.