[RESOLVED] Outlook Mail - Attachement
Hello!
I have a program that monitors a folder to check for dropped files.
I have been asked to do something similar with emails that come in and have the program open an email and grab the attachement and process it.
Is it possible to use VB .NET to interact with outlook in that way?
Thanks!
Re: Outlook Mail - Attachement
It is but it is not as simple as watching a folder for files I'm afraid. So are you just wanting to basically make your program do something every time a new email is received?
PS you should have posted this in the office development forum really :)
Re: Outlook Mail - Attachement
Oh! Sorry about that, I figure since I will be creating it in VB .NET and not VBA (or whatever it is called now :) that it should go here! Sorry!
Exactly...every tiem a new message comes in, it would check who it is from and if it has an attachement and then go from there.
Re: Outlook Mail - Attachement
OK I tried to do something like this ages ago and basically gave up in the end... but the reason I was having such a hard time was because the mailbox I wanted to check was not the primary mailbox of the Outlook profile being used. How is your program supposed to be used? Is it going to be an Outlook add-in or is it a standalone program that will be run on computers that already have the relevant Outlook profile configured? Or is it supposed to have nothing to do with Outlook and needs to just be able to check this mailbox on its own (and if that is the case, do you have POP3 or IMAP access to the mailbox?)
Re: Outlook Mail - Attachement
It would be a standalone application (our IT dept won't let us do an add in).
We could have it run on a PC that is configured to have outlook open with the mailbox being it's main box.
Our mail uses exchange servers, and honestly I have no idea if i can access them via POP3 or IMAPI...i would think not, knowing how tiight they are with security, but not really knowing anything about POP3 and IMAPI, I can't really answer that.
All I have ever done with outlook is I have created tools that will send emails via the users profile (it shows in their sent folders, etc) or send via SMTP when the exchange server name is known.
Re: Outlook Mail - Attachement
Well if you have access to an Outlook profile that has the box as its primary box then you dont need to worry about POP3 etc... I think. I cant remember if when I tried it I was doing an Add-In or a standalone app. Either way, what I was trying to use (but incorrectly) was the event that gets fired when a new email arrives in the default mailbox of that outlook profile.
Have a look at this, not sure if its for an Add-In though : http://www.java2s.com/Tutorial/VB/04...ailwatcher.htm
Re: Outlook Mail - Attachement
thanks! I'll check it out tomorrow and let you know!
Re: Outlook Mail - Attachement
Awesome! This worked perfectly. I am able to check one of the shared mailboxes that is added to outlook.
Thanks!
Re: [RESOLVED] Outlook Mail - Attachement