Results 1 to 9 of 9

Thread: [RESOLVED] Outlook Mail - Attachement

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Posts
    406

    Resolved [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!

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Posts
    406

    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.

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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?)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Posts
    406

    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.

  6. #6
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Posts
    406

    Re: Outlook Mail - Attachement

    thanks! I'll check it out tomorrow and let you know!

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Posts
    406

    Re: Outlook Mail - Attachement

    Awesome! This worked perfectly. I am able to check one of the shared mailboxes that is added to outlook.

    Thanks!

  9. #9
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [RESOLVED] Outlook Mail - Attachement

    No problem
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width