PC Review

Thread Tools Rate Thread

Outlook 2007--checking if a folder exists

John Meyer
Posts: n/a
      6th May 2010
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?
Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill all files in Folder, If folder exists u473 Microsoft Excel Programming 2 28th Nov 2008 09:57 PM
Folder:Inbox Syncronizing headers. 'reported error (0x80040604): A folder by this name already exists.' Dave Anderson Microsoft Outlook Discussion 0 15th Sep 2007 04:57 PM
Check if folder exists, if yes just copy sheet in to folder? Simon Lloyd Microsoft Excel Programming 3 19th Jun 2006 03:44 PM
Detecting if data exists on "Insert Into" and changing the value in field if exists! Les Microsoft Access Form Coding 2 8th Apr 2004 11:38 AM
Offline folder trying to synchronize to a folder that no longer exists GlenBlack Windows XP Work Remotely 1 30th Oct 2003 03:23 AM




All times are GMT +1. The time now is 07:11 PM.