Outlook 2007--checking if a folder exists

Discussion in 'Microsoft VB .NET' started by John Meyer, May 6, 2010.

  1. John Meyer

    John Meyer Guest

    I'm developing a VSTO addin and I'm coming to the part where I'm
    checking if a particular folder exists:

    Dim oTweetFolder As Outlook.MAPIFolder = ReadDefaultFolders.Folders("@"
    & m_twConn.AccountInformation.ScreenName)
    'first run so we'll dynamically create the folders
    If oTweetFolder Is Nothing Then


    But I keep getting a A first chance exception of type
    'System.Runtime.InteropServices.COMException' on that first line. Is
    there any other way to check the existance of a folder without
    triggering an exception?
     
    John Meyer, May 6, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. twick10

    Checking to see if Instance Exists

    twick10, Jun 25, 2004, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    244
    twick10
    Jun 25, 2004
  2. Peter

    Checking If File Exists...Best Method

    Peter, Aug 11, 2004, in forum: Microsoft VB .NET
    Replies:
    4
    Views:
    305
    Chris Dunaway
    Aug 13, 2004
  3. Brian Henry

    checking to see if a folder exists

    Brian Henry, Nov 16, 2004, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    230
    Cor Ligthert
    Nov 17, 2004
  4. BobAchgill

    Folder.Exists method??

    BobAchgill, Feb 28, 2005, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    266
    Peter Proost
    Feb 28, 2005
  5. steve
    Replies:
    3
    Views:
    674
    Cor Ligthert
    May 25, 2005
  6. RSH

    Checking to see if a database exists...

    RSH, Jun 29, 2005, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    261
    Mike Labosh
    Jun 29, 2005
  7. Checking if registry value exists

    , May 2, 2007, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    498
    Yet Another One
    May 2, 2007
  8. thomasc
    Replies:
    0
    Views:
    1,480
    thomasc
    Feb 23, 2009
Loading...