msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Explorers or Inspectors... Which to use to catch my event?

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook
Author Message
landau



Joined: 06 Feb 2008
Posts: 12

PostPosted: Tue Feb 12, 2008 3:47 am    Post subject: Explorers or Inspectors... Which to use to catch my event? Reply with quote

Appologies if this is a double post: I tried to reply to the original
post (help writing a VBA to move email) but that didn't seem to work.

I use Outlook 2007 on a Win XP machine. I have 1 large Outlook window
open with Preview turned ON. This is how I view all my email. I just
use the down-arrow to go to the next email. If I don't explicitely
move an email, or flag it before moving to another email, I'd like my
VBA scrip to move it to an Archive Folder.

If i use the INSPECTOR object, all I can see is "CLOSE", and this even
is not triggered in the main inspector when switching emails.

If I use the EXPLORER object, I can trigger on the "SELECTIONCHANGE"
event but then I'm too late since the Selected item in the explorer is
already the "new" item.... but what I really wanted to do was to
Archive the email I just left Smile.

Any ideas?

Thanks
-Ed

Archived from group: microsoft>public>office>developer>outlook>vba
Back to top
View user's profile Send private message
Michael Bauer [MVP - Outl



Joined: 12 Aug 2007
Posts: 92

PostPosted: Tue Feb 12, 2008 1:15 pm    Post subject: Re: Explorers or Inspectors... Which to use to catch my even Reply with quote

You can use SelectionChange and store references to all selected items in a
collection. If you get the next SelectionChange, move the items from your
collection.

--
Best regards
Michael Bauer - MVP Outlook
Use Outlook Categories? This is Your Tool:


Am Mon, 11 Feb 2008 22:47:08 -0800 (PST) schrieb landau@skiz.net:

> Appologies if this is a double post: I tried to reply to the original
> post (help writing a VBA to move email) but that didn't seem to work.
>
> I use Outlook 2007 on a Win XP machine. I have 1 large Outlook window
> open with Preview turned ON. This is how I view all my email. I just
> use the down-arrow to go to the next email. If I don't explicitely
> move an email, or flag it before moving to another email, I'd like my
> VBA scrip to move it to an Archive Folder.
>
> If i use the INSPECTOR object, all I can see is "CLOSE", and this even
> is not triggered in the main inspector when switching emails.
>
> If I use the EXPLORER object, I can trigger on the "SELECTIONCHANGE"
> event but then I'm too late since the Selected item in the explorer is
> already the "new" item.... but what I really wanted to do was to
> Archive the email I just left Smile.
>
> Any ideas?
>
> Thanks
> -Ed
Back to top
View user's profile Send private message
landau



Joined: 06 Feb 2008
Posts: 12

PostPosted: Tue Feb 12, 2008 2:20 pm    Post subject: Re: Explorers or Inspectors... Which to use to catch my even Reply with quote

Yup... I had that idea overnight and it worked. Thanks a lot for
confirming this is the way to go.
Now I just have to figure out which object to declare to cover all
items in my inbox (which are not all mailItems)... but I posted a
different thread on this Smile.

Thanks again,
-Ed

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group