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 / Programming VBA / November 2004

Tip: Looking for answers? Try searching our database.

forwarding unread messages during certain times ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Walshy - 09 Nov 2004 10:55 GMT
I dont think there is a way to forward messages automatically or using VB in
outlook without the programme running.. If so could someone please let me
know..

If not what I would like to do is when I log on in the morning (Hours
9:00-17:00) I want all the new messages from the previous day that have been
sent after work to be forwarded to an additional address ??? Is this poss
please ??? or on open send all unread messages to an additional address ???

Thanks for your help

Regards
Michael Bauer - 09 Nov 2004 15:27 GMT
Hi Walshy,

in Application_Startup you can loop through the folder and check each
item if it is unread, if so forward the item.

Signature

Viele Grüße
Michael Bauer

> I dont think there is a way to forward messages automatically or using VB in
> outlook without the programme running.. If so could someone please let me
[quoted text clipped - 8 lines]
>
> Regards
Walshy - 09 Nov 2004 16:14 GMT
Any chance you could give me the code please ? Im still learning slowly... doh

would be grateful thanks

> Hi Walshy,
>
[quoted text clipped - 18 lines]
> >
> > Regards
Michael Bauer - 09 Nov 2004 16:41 GMT
Yes, of course.

private sub Application_Startup()
   dim obj as object
   for each obj in application.session.getfolder(olfolderinbox).items
       if typeof obj is outlook.mailitem then
           set omail=obj
           ' the rest Eric gave to you
       endif
   next
end sub

Signature

Viele Grüße
Michael Bauer

> Any chance you could give me the code please ? Im still learning slowly... doh
>
[quoted text clipped - 22 lines]
> > >
> > > Regards
Michael Bauer - 09 Nov 2004 17:39 GMT
>     for each obj in application.session.getfolder(olfolderinbox).items

Sorry, that should be

    for each obj in
application.session.GetDefaultFolder(olfolderinbox).items

Signature

Viele Grüße
Michael Bauer

 
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



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