A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Clear multiple MsgBox!!!



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 2nd 06, 03:45 PM posted to microsoft.public.outlook.program_vba
RemySS
external usenet poster
 
Posts: 5
Default Clear multiple MsgBox!!!

Hi Everyone

I use a bit of code that gives me the same alert that was used on Outlook
2000 for new mail Items...I am using Outlook 2003. btw i dont like the mail
envelope or desktop alert thats why im using this macro!

This code is in "ThisOutlookSession" and invoked via the Rules and Alerts
wizard for any new mail received without exceptions.

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
End Sub

I have two problems...
1. When I start Outlook in the morning, all the mail i recieved creates a
new MsgBox, so if i have 10 emails i have to click the OK button 10 times!
2. Sometimes when i restart Outlook, the macro doesn't work...when i open
the Rules and Alerts wizard, the check box is blank for the action.

I need some code that will allow me to just click ok the once for emails,
but still alert me each time a new one arrives during the day. Also, anyone
got any ideas on why the macro may stop working?

Thanks in Advance!!!
Ads
  #2  
Old May 3rd 06, 06:34 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Clear multiple MsgBox!!!

Am Tue, 2 May 2006 06:45:02 -0700 schrieb RemySS:

1) You could use an UserForm instead of the message box and show it
non-modal. On that UserForm each mail could be added into a ListBox e.g..
While the form is visible each new mail would be added to the same form.

2) -

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Everyone

I use a bit of code that gives me the same alert that was used on Outlook
2000 for new mail Items...I am using Outlook 2003. btw i dont like the

mail
envelope or desktop alert thats why im using this macro!

This code is in "ThisOutlookSession" and invoked via the Rules and Alerts
wizard for any new mail received without exceptions.

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
End Sub

I have two problems...
1. When I start Outlook in the morning, all the mail i recieved creates a
new MsgBox, so if i have 10 emails i have to click the OK button 10 times!
2. Sometimes when i restart Outlook, the macro doesn't work...when i open
the Rules and Alerts wizard, the check box is blank for the action.

I need some code that will allow me to just click ok the once for emails,
but still alert me each time a new one arrives during the day. Also,

anyone
got any ideas on why the macro may stop working?

Thanks in Advance!!!

  #3  
Old May 4th 06, 01:32 PM posted to microsoft.public.outlook.program_vba
RemySS
external usenet poster
 
Posts: 5
Default Clear multiple MsgBox!!!

Hi Michael,

Im a VBA intermediate so could you give me an example of how i would code
such a form?

Thanks

"Michael Bauer" wrote:

Am Tue, 2 May 2006 06:45:02 -0700 schrieb RemySS:

1) You could use an UserForm instead of the message box and show it
non-modal. On that UserForm each mail could be added into a ListBox e.g..
While the form is visible each new mail would be added to the same form.

2) -

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Everyone

I use a bit of code that gives me the same alert that was used on Outlook
2000 for new mail Items...I am using Outlook 2003. btw i dont like the

mail
envelope or desktop alert thats why im using this macro!

This code is in "ThisOutlookSession" and invoked via the Rules and Alerts
wizard for any new mail received without exceptions.

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
End Sub

I have two problems...
1. When I start Outlook in the morning, all the mail i recieved creates a
new MsgBox, so if i have 10 emails i have to click the OK button 10 times!
2. Sometimes when i restart Outlook, the macro doesn't work...when i open
the Rules and Alerts wizard, the check box is blank for the action.

I need some code that will allow me to just click ok the once for emails,
but still alert me each time a new one arrives during the day. Also,

anyone
got any ideas on why the macro may stop working?

Thanks in Advance!!!


  #4  
Old May 5th 06, 07:39 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Clear multiple MsgBox!!!

Am Thu, 4 May 2006 04:32:01 -0700 schrieb RemySS:

Please add an UserForm to your VBA project. Then show the Toolbox and drag a
ListBox onto that form.

The code could look like this:

form
Public Sub AddItem(Text As String)
ListBox1.AddItem Text
End Sub
/form

ThisOutlookSession
Private fm as Form1

Sub CustomMailMessageRule(Item As Outlook.MailItem)
On Error Resume Next
If fm Is Nothing Then Set fm=new Form1
fm.AddItem Item.Subject
fm.Show
End Sub
/ThisOutlookSession

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Michael,

Im a VBA intermediate so could you give me an example of how i would code
such a form?

Thanks

"Michael Bauer" wrote:

Am Tue, 2 May 2006 06:45:02 -0700 schrieb RemySS:

1) You could use an UserForm instead of the message box and show it
non-modal. On that UserForm each mail could be added into a ListBox e.g..
While the form is visible each new mail would be added to the same form.

2) -

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Everyone

I use a bit of code that gives me the same alert that was used on

Outlook
2000 for new mail Items...I am using Outlook 2003. btw i dont like the

mail
envelope or desktop alert thats why im using this macro!

This code is in "ThisOutlookSession" and invoked via the Rules and

Alerts
wizard for any new mail received without exceptions.

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
End Sub

I have two problems...
1. When I start Outlook in the morning, all the mail i recieved creates

a
new MsgBox, so if i have 10 emails i have to click the OK button 10

times!
2. Sometimes when i restart Outlook, the macro doesn't work...when i

open
the Rules and Alerts wizard, the check box is blank for the action.

I need some code that will allow me to just click ok the once for

emails,
but still alert me each time a new one arrives during the day. Also,

anyone
got any ideas on why the macro may stop working?

Thanks in Advance!!!


  #5  
Old May 5th 06, 10:07 AM posted to microsoft.public.outlook.program_vba
RemySS
external usenet poster
 
Posts: 5
Default Clear multiple MsgBox!!!

I think i can work with that!!

Thanks!

"Michael Bauer" wrote:

Am Thu, 4 May 2006 04:32:01 -0700 schrieb RemySS:

Please add an UserForm to your VBA project. Then show the Toolbox and drag a
ListBox onto that form.

The code could look like this:

form
Public Sub AddItem(Text As String)
ListBox1.AddItem Text
End Sub
/form

ThisOutlookSession
Private fm as Form1

Sub CustomMailMessageRule(Item As Outlook.MailItem)
On Error Resume Next
If fm Is Nothing Then Set fm=new Form1
fm.AddItem Item.Subject
fm.Show
End Sub
/ThisOutlookSession

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Michael,

Im a VBA intermediate so could you give me an example of how i would code
such a form?

Thanks

"Michael Bauer" wrote:

Am Tue, 2 May 2006 06:45:02 -0700 schrieb RemySS:

1) You could use an UserForm instead of the message box and show it
non-modal. On that UserForm each mail could be added into a ListBox e.g..
While the form is visible each new mail would be added to the same form.

2) -

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Everyone

I use a bit of code that gives me the same alert that was used on

Outlook
2000 for new mail Items...I am using Outlook 2003. btw i dont like the
mail
envelope or desktop alert thats why im using this macro!

This code is in "ThisOutlookSession" and invoked via the Rules and

Alerts
wizard for any new mail received without exceptions.

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
End Sub

I have two problems...
1. When I start Outlook in the morning, all the mail i recieved creates

a
new MsgBox, so if i have 10 emails i have to click the OK button 10

times!
2. Sometimes when i restart Outlook, the macro doesn't work...when i

open
the Rules and Alerts wizard, the check box is blank for the action.

I need some code that will allow me to just click ok the once for

emails,
but still alert me each time a new one arrives during the day. Also,
anyone
got any ideas on why the macro may stop working?

Thanks in Advance!!!


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on frames and msgbox Jade Outlook - Using Forms 4 April 26th 06 04:12 AM
How to I Clear Cached Searches? razor Outlook Express 2 February 26th 06 02:35 AM
How to clear old e-mail addresses? Jan Smith Outlook - General Queries 2 January 24th 06 06:28 PM
How to clear old e-mail addresses? Jan Smith Outlook - Using Contacts 2 January 24th 06 06:28 PM
how to clear deleted items? [email protected] Outlook - General Queries 3 January 16th 06 03:36 PM


All times are GMT +1. The time now is 12:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.