Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / New Users / May 2008

Tip: Looking for answers? Try searching our database.

Open non-Inbox folder if any unread there

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zofficedepot@hotmail.com - 27 May 2008 20:48 GMT
I want upon starting OL07 to have it normally go to Inbox, but instead
go to folder XYZ if there is anything unread in XYZ.  (BTW, I don't
care if it does or doesn't when a new item arrives in XYZ after OL is
running.)

Can this be done within a Rule? This always applies to a certain
Sender. Is there an action that changes the current folder when it
fires the rule? How about an action that just opens the message (I'm
surprised that I don't see that action listed)?

I also noticed one of the actions for a rule is "run a script." Does
that refer to a VBA sub name? If so, I could change folders that way.
(  However, just as a matter of style, I'd prefer to avoid code if
it's built it - avid coder avoids coding :)  )
Peter Durkee - 27 May 2008 22:11 GMT
You can't write a rule to make Outlook behave as you want, but you could
have Outlook go to the Unread Mail Search Folder when it starts up. Since
you can restrict the folders that search folders search in you can get
approximately the result you want this way.

-Peter

>I want upon starting OL07 to have it normally go to Inbox, but instead
> go to folder XYZ if there is anything unread in XYZ.  (BTW, I don't
[quoted text clipped - 10 lines]
> (  However, just as a matter of style, I'd prefer to avoid code if
> it's built it - avid coder avoids coding :)  )
zofficedepot@hotmail.com - 29 May 2008 00:22 GMT
Thank you Peter for the reply and helpful suggestions. But I only want
to go to Unread of one specific folder; and as far as using a search
folder goes I don't see where you can specify "Unread," which is the
only circumstance I want to go there. Anyway I hadn't even conceived
of using a search folder as startup default. Thank you for that
thought-inspiring idea.

Well if it's not built in this should be easy for regular Outlook
coders. Is there another Outlook group where programmers go?
Otherwise, this (below) needs help. Note the crashing line containing
the word invalid. (Better yet, is there a direct property instead of
For Each, in the spirit of "Unread.count" ?)

Private Sub test_StartupSearchFolderFooForUnRead()  'and go there if
anything unread
 Dim olapp As Outlook.Application, objFolder As Outlook.Folder,
myItem As mailItem
 Set olapp = Outlook.Application 'Should I even bother w/ this var.?
 Set objFolder = olapp.Session.Folders("Mailbox - John
Doe").Folders("Excel")
 For Each myItem In objFolder   'This line invalid. Help?
    If myItem.UnRead Then
       objFolder.Display
       Exit For
    End If
 Next
 Set objFolder = Nothing: Set olapp = Nothing
End Sub

I guess "run a script" means something else.

Might this go in ThisOutlookSession Application_Startup?

I understand that this does not switch from the current Folder (which
I have defaulted to Inbox).

Thanks for reading this far!
zofficedepot@hotmail.com - 29 May 2008 19:55 GMT
Am I using the wrong forum? Or is this subject name such that few even
read the thread? I thought this would be trivial to most nonbeginners.
Brian Tillman - 30 May 2008 12:42 GMT
> Well if it's not built in this should be easy for regular Outlook
> coders. Is there another Outlook group where programmers go?

Yes.  Code discussion is in microsoft.public.outlook.program_vba
Signature

Brian Tillman [MVP-Outlook]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.