PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Open mail via WindowsDesktopSearch

Reply

Open mail via WindowsDesktopSearch

 
Thread Tools Rate Thread
Old 15-07-2008, 01:28 PM   #1
Andre Maas
Guest
 
Posts: n/a
Default Open mail via WindowsDesktopSearch


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é
  Reply With Quote
Old 15-07-2008, 02:15 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Open mail via WindowsDesktopSearch

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é


  Reply With Quote
Old 16-07-2008, 08:37 AM   #3
Andre Maas
Guest
 
Posts: n/a
Default Re: Open mail via WindowsDesktopSearch

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.
>


  Reply With Quote
Old 16-07-2008, 02:32 PM   #4
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Open mail via WindowsDesktopSearch

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.
>>

>


  Reply With Quote
Old 16-07-2008, 02:58 PM   #5
Andre Maas
Guest
 
Posts: n/a
Default Re: Open mail via WindowsDesktopSearch

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.
>


  Reply With Quote
Old 16-07-2008, 04:32 PM   #6
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Open mail via WindowsDesktopSearch

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


  Reply With Quote
Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off