PC Review


Reply
Thread Tools Rate Thread

Open mail via WindowsDesktopSearch

 
 
Andre Maas
Guest
Posts: n/a
 
      15th Jul 2008
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
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      15th Jul 2008
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
 
Andre Maas
Guest
Posts: n/a
 
      16th Jul 2008
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
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      16th Jul 2008
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" <(E-Mail Removed)> wrote in message
news:uQfH$(E-Mail Removed)...
> 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
 
Andre Maas
Guest
Posts: n/a
 
      16th Jul 2008
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
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      16th Jul 2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windoows Mail erases my yahoo mail when I open Windows Mail Mondocain Windows Vista Mail 3 24th Jan 2008 04:55 AM
cannot open a link in a mail message, only open my home page =?Utf-8?B?VHdpcmxlcnNNYW1h?= Microsoft Outlook Discussion 1 6th Nov 2007 08:56 PM
unable to open default e-mail folders; info store won't open =?Utf-8?B?Tm8gQXZhaWw=?= Microsoft Outlook Installation 3 30th Jul 2007 01:48 AM
unable to open default e-mail folders or open any outkook file =?Utf-8?B?SGl0YWNoaQ==?= Microsoft Outlook Contacts 1 25th Feb 2007 09:19 PM
Unable to open your default e-mail folders when open Outlook =?Utf-8?B?T21pdG9mbw==?= Microsoft Outlook 3 27th Sep 2004 05:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:18 PM.