![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
When I try to compile this:
foreach (Outlook.MAPIFolder tmpFolder in theFolder.Folders) { MesageBox.Show(tmpFolder.Name); } I get this: foreach statement cannot operate on variables of type 'Outlook.Folders' because 'Outlook.Folders' does not contain a definition for 'GetEnumerator', or it is inaccessible Anyone know what is the problem? thanks, craig |
Ads |
#2
|
|||
|
|||
![]()
The problem is you can't use foreach, as the error says. Use a for loop
instead. It's actually faster anyway. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "spareway" wrote in message ups.com... When I try to compile this: foreach (Outlook.MAPIFolder tmpFolder in theFolder.Folders) { MesageBox.Show(tmpFolder.Name); } I get this: foreach statement cannot operate on variables of type 'Outlook.Folders' because 'Outlook.Folders' does not contain a definition for 'GetEnumerator', or it is inaccessible Anyone know what is the problem? thanks, craig |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Project Won't Run or Compile | Ron | Outlook and VBA | 6 | January 23rd 07 02:24 AM |
Help -Outlook.MAPIFolder, VBA macros | lerneree | Outlook and VBA | 1 | September 6th 06 12:59 PM |
What is: Compile Error in hidden module: AutoExecNew | Guitar125 | Outlook and VBA | 1 | July 7th 06 05:52 AM |
Outlook 2002 (XP) - MAPIFolder.Description - Runtime Error -2113470450 | Johannes Harth | Outlook and VBA | 3 | June 30th 06 09:34 PM |
How do I compile statistics about meetings? | Stu Detroit | Outlook - Calandaring | 0 | March 9th 06 09:25 PM |