![]() |
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
|
|||
|
|||
![]()
I need to find out, where a mailitem is stored, that is the folder name
within Outlook. I need that information because I want users to execute an action only on items from the inbox. Therefore I want to check someting like: if mailitem.folder is Inbox do... else... Currently, my code is generating an additional button in each opened mail (an email that is opened with a doubleclick from within the Inbox). Clicking this button opens a dialog and runs additional code... Now I want to avoid this button to show up when an email is opened from lets say a subfolder of the Inbox. Hope you can give me hints... |
Ads |
#2
|
|||
|
|||
![]()
MailItem.Parent property will return the parent folder (MAPIFolder).
Do not hardcode the "Inbox" name, or your code will fail in locales other than English. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Harald W." wrote in message ... I need to find out, where a mailitem is stored, that is the folder name within Outlook. I need that information because I want users to execute an action only on items from the inbox. Therefore I want to check someting like: if mailitem.folder is Inbox do... else... Currently, my code is generating an additional button in each opened mail (an email that is opened with a doubleclick from within the Inbox). Clicking this button opens a dialog and runs additional code... Now I want to avoid this button to show up when an email is opened from lets say a subfolder of the Inbox. Hope you can give me hints... |
#3
|
|||
|
|||
![]()
Thanx a lot!
Sometimes, you do not even find the easiest solutions... "Dmitry Streblechenko" wrote: MailItem.Parent property will return the parent folder (MAPIFolder). Do not hardcode the "Inbox" name, or your code will fail in locales other than English. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Harald W." wrote in message ... I need to find out, where a mailitem is stored, that is the folder name within Outlook. I need that information because I want users to execute an action only on items from the inbox. Therefore I want to check someting like: if mailitem.folder is Inbox do... else... Currently, my code is generating an additional button in each opened mail (an email that is opened with a doubleclick from within the Inbox). Clicking this button opens a dialog and runs additional code... Now I want to avoid this button to show up when an email is opened from lets say a subfolder of the Inbox. Hope you can give me hints... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy a Mailitem to public folder after being sent | Niclas | Outlook and VBA | 5 | June 14th 07 09:27 AM |
How to Add a MailItem to a Folder | Ron | Outlook and VBA | 2 | January 10th 07 09:53 PM |
Where are Local Folder E-mails Stored? | illinifan1985 | Outlook Express | 4 | July 9th 06 06:34 PM |
MailItem Folder Path | Fox via OfficeKB.com | Outlook and VBA | 1 | July 7th 06 03:39 PM |
OE6 'stored folder' problem | Aya | Outlook Express | 3 | April 26th 06 02:52 AM |