![]() |
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
|
|||
|
|||
![]()
Hi guys
I have an explorer toolbar in my Add-in and when user presses buttons on it, Add-in does something to a selected mail item. When I am in Outlook Today, it doesn't work - for unknown reason the check Assigned(IExplorer.Selection) raises an exception. IExplorer is not empty. Why is it so? Thanks Slava |
#2
|
|||
|
|||
![]()
I have found an ugly hack
I check if I am in 'Outlook Today' folder: IExplorer.CurrentFolder.Name FOutlookTodayFolder.Name Strangely IExplorer.CurrentFolder FOutlookTodayFolder doesn't work for some reason I get FOutlookTodayFolder like this: NmSpace := OutlookApp.GetNamespace('MAPI'); Inbox := NmSpace.GetDefaultFolder(olFolderInbox); FOutlookTodayFolder := Inbox.Parent as MAPIFolder; |
#3
|
|||
|
|||
![]()
You'd be better off comparing the entry ids rather than names.
The fact that (IExplorer.CurrentFolder FOutlookTodayFolder) is perfectly normal. Each time you access Explorer.CurrentFolder, OOM returns a brand new COM object. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in message ... I have found an ugly hack I check if I am in 'Outlook Today' folder: IExplorer.CurrentFolder.Name FOutlookTodayFolder.Name Strangely IExplorer.CurrentFolder FOutlookTodayFolder doesn't work for some reason I get FOutlookTodayFolder like this: NmSpace := OutlookApp.GetNamespace('MAPI'); Inbox := NmSpace.GetDefaultFolder(olFolderInbox); FOutlookTodayFolder := Inbox.Parent as MAPIFolder; |
#4
|
|||
|
|||
![]()
I will probably use EntryID if
(IExplorer.CurrentFolderFOutlookTodayFolder) will not work It shows different addresses for IExplorer.CurrentFolder and FOutlookTodayFolder How can I compare them? "Dmitry Streblechenko" wrote in message ... You'd be better off comparing the entry ids rather than names. The fact that (IExplorer.CurrentFolder FOutlookTodayFolder) is perfectly normal. Each time you access Explorer.CurrentFolder, OOM returns a brand new COM object. Dmitry Streblechenko (MVP) http://www.dimastr.com/ |
#5
|
|||
|
|||
![]()
Compare entry ids.
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in message ... I will probably use EntryID if (IExplorer.CurrentFolderFOutlookTodayFolder) will not work It shows different addresses for IExplorer.CurrentFolder and FOutlookTodayFolder How can I compare them? "Dmitry Streblechenko" wrote in message ... You'd be better off comparing the entry ids rather than names. The fact that (IExplorer.CurrentFolder FOutlookTodayFolder) is perfectly normal. Each time you access Explorer.CurrentFolder, OOM returns a brand new COM object. Dmitry Streblechenko (MVP) http://www.dimastr.com/ |
#6
|
|||
|
|||
![]()
Thanks Dmitry
EntryIDs work fine Why can't I compare Names? "Dmitry Streblechenko" wrote in message ... Compare entry ids. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool |
#7
|
|||
|
|||
![]()
Selection is probably empty because the OutlookToday folder is the top of
store and usually doesn't have items in it or anything selected. -- 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 "Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in message ... Hi guys I have an explorer toolbar in my Add-in and when user presses buttons on it, Add-in does something to a selected mail item. When I am in Outlook Today, it doesn't work - for unknown reason the check Assigned(IExplorer.Selection) raises an exception. IExplorer is not empty. Why is it so? Thanks Slava |
#8
|
|||
|
|||
![]()
In a normal folder Selection is never nil, even if it's empty
When I try to access IExplorer.Selection for Outlook Today, it's not empty - I get an error Probably Selection is invalid for Outlook Today "Ken Slovak - [MVP - Outlook]" wrote in message ... Selection is probably empty because the OutlookToday folder is the top of store and usually doesn't have items in it or anything selected. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Internet Explorer Script Error 'hoverEdit' is undefined | robin | Outlook Express | 5 | November 6th 06 11:14 PM |
Calendar error in the Outlook Today setting. | HKHAIA | Outlook - Calandaring | 0 | October 17th 06 01:28 PM |
Explorer.exe -Application Error | Dirving | Outlook - Installation | 1 | July 5th 06 05:36 PM |
Outlook 2007 Spell Check Error | Jim B | Outlook - Installation | 0 | June 7th 06 11:39 PM |
Outlook Express won't check for new messages, getting this error! | psongman | Outlook Express | 12 | January 21st 06 03:22 AM |