Select/Unselect items in ActiveExplorer by code?

  • Thread starter Heinz-Josef Bomanns
  • Start date
Status
Not open for further replies.
H

Heinz-Josef Bomanns

Good morning,

is there any way to select or unselect items in ActiveExplorer by

code? For e.g. there are five mails selected by the user, i process

each mail in my add in through a loop like this:

for each Item in ActiveExplorer.Selection

'Do something with the mail

if SomeCondition = True then

Item.Selected = False 'Is something like this possible?

'or perhaps Item.Unselect?

end if

next Item

After the loop is done there should remain for e.g. two mails

selected. Second example:

for each Item in ActiveExplorer.CurrentFolder

if SomeCondition = True then

Item.Selected = True 'Select the mail

'or perhaps Item.Select?

end if

next Item

This should select mails in ActiveExplorer based on criterias checked

for each mail. Thanks for any hints or suggestions...

So long...

> ..Bomi


> !!! In case you want to reply via email please use Reply-To address and remove underscores (_) !!!
 
K

Ken Slovak - [MVP - Outlook]

The ability to do that was added to the object model in Outlook 2010. In

earlier versions of Outlook there's no way to do that.

"Heinz-Josef Bomanns" <NotForMail@t-online.de> wrote in message

news:lqu7d59u6r1pr58m6ofif0lingp3v3k5d2@4ax.com...
> Good morning,

> is there any way to select or unselect items in ActiveExplorer by
> code? For e.g. there are five mails selected by the user, i process
> each mail in my add in through a loop like this:

> for each Item in ActiveExplorer.Selection
> 'Do something with the mail
> if SomeCondition = True then
> Item.Selected = False 'Is something like this possible?
> 'or perhaps Item.Unselect?
> end if
> next Item

> After the loop is done there should remain for e.g. two mails
> selected. Second example:

> for each Item in ActiveExplorer.CurrentFolder
> if SomeCondition = True then
> Item.Selected = True 'Select the mail
> 'or perhaps Item.Select?
> end if
> next Item

> This should select mails in ActiveExplorer based on criterias checked
> for each mail. Thanks for any hints or suggestions...

>

> So long...
> ...Bomi
>
> > !!! In case you want to reply via email please use Reply-To address and
> > remove underscores (_) !!!
 
H

Heinz-Josef Bomanns

Hallo Ken,


> The ability to do that was added to the object model in Outlook 2010. In
> earlier versions of Outlook there's no way to do that.


Thanks, was afraid of that :)

So long...

> ..Bomi


> !!! In case you want to reply via email please use Reply-To address and remove underscores (_) !!!
 
Status
Not open for further replies.
Top