PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Open mail via WindowsDesktopSearch
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Open mail via WindowsDesktopSearch
![]() |
Open mail via WindowsDesktopSearch |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello,
i try to change some properties in a mail which is opened from the windows desktop search, but it don't work. if i worked in outlook and try to open a mail i used the function: Application.ActiveExplorer().Selection[1] this works fine. i get the mail i clicked on. But if i try to open an mail which i found with the windows desktop search this code wouldn't work. I think that the use of ActiveExplorer() is the fault. Has someone a tip? Thanx and regards André |
|
|
|
#2 |
|
Guest
Posts: n/a
|
The active open item is ActiveInspector.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Andre Maas" <spamdummy@abwesend.de> wrote in message news:%23665GZn5IHA.4344@TK2MSFTNGP03.phx.gbl... > Hello, > > i try to change some properties in a mail which is opened from the windows > desktop search, but it don't work. > > if i worked in outlook and try to open a mail i used the function: > Application.ActiveExplorer().Selection[1] > > this works fine. i get the mail i clicked on. > > But if i try to open an mail which i found with the windows desktop search > this code wouldn't work. > > I think that the use of ActiveExplorer() is the fault. > > Has someone a tip? > > Thanx and regards > André |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi,
if i use the Application.ActiveInspector().CurrentItem an nullpointerexception is thrown. i also checked the ActiveInspector count which is 0! Regards Andre Ken Slovak - [MVP - Outlook] wrote: > The active open item is ActiveInspector. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
You can't count ActiveInspector, it's an object. You can count the
Outlook.Application.Inspectors collection. Where are you trying to read that ActiveInspector.CurrentItem object? In what event handler? If this is from outside Outlook then you might need to use Outlook.Application.Inspectors.Item(1) instead of ActiveInspector. See if that works. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Andre Maas" <spamdummy@abwesend.de> wrote in message news:uQfH$ax5IHA.1280@TK2MSFTNGP02.phx.gbl... > Hi, > > if i use the Application.ActiveInspector().CurrentItem an > nullpointerexception is thrown. > > i also checked the ActiveInspector count which is 0! > > Regards > Andre > > > > > Ken Slovak - [MVP - Outlook] wrote: >> The active open item is ActiveInspector. >> > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
I've tested 2 events.
1. Application.ItemLoad and 2. Application.ActiveExplorer().SelectionChange it seems that the second event isn't the right one because of 'ActiveExplorer()'. But all i tested i never get the Application.Inspectors.Item(1). :-( Is there a special event i must listen to? Regards Andre Ken Slovak - [MVP - Outlook] wrote: > You can't count ActiveInspector, it's an object. You can count the > Outlook.Application.Inspectors collection. > > Where are you trying to read that ActiveInspector.CurrentItem object? In > what event handler? > > If this is from outside Outlook then you might need to use > Outlook.Application.Inspectors.Item(1) instead of ActiveInspector. See > if that works. > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
If Outlook isn't running then ItemLoad won't fire and Explorers have nothing
to do with open items, Inspectors are associated with open items as I've mentioned a number of times. When a Simple MAPI Inspector is opened (from the file system or a Send To action) you don't get any events, not even the Application.Inspectors.NewInspector event, even if Outlook is already running at the time. The only indication that a Simple MAPI Inspector has been opened is that the Inspectors.Count property is incremented when that Inspector is added to the Inspectors collection. The only access to that Inspector is through the Inspectors collection. What I told you is the only way. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Andre Maas" <spamdummy@abwesend.de> wrote in message news:eTpK6v05IHA.4852@TK2MSFTNGP03.phx.gbl... > I've tested 2 events. > > 1. Application.ItemLoad and > 2. Application.ActiveExplorer().SelectionChange > > it seems that the second event isn't the right one because of > 'ActiveExplorer()'. > > But all i tested i never get the Application.Inspectors.Item(1). :-( > > Is there a special event i must listen to? > > Regards > Andre |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

