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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. twick10

    Checking to see if Instance Exists

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

    Checking If File Exists...Best Method

    Peter, Aug 11, 2004, in forum: Microsoft VB .NET
    Replies:
    4
    Views:
    280
    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:
    214
    Cor Ligthert
    Nov 17, 2004
  4. BobAchgill

    Folder.Exists method??

    BobAchgill, Feb 28, 2005, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    247
    Peter Proost
    Feb 28, 2005
  5. steve
    Replies:
    3
    Views:
    614
    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:
    247
    Mike Labosh
    Jun 29, 2005
  7. Checking if registry value exists

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