![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 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
|
|||
|
|||
![]()
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 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
|
|||
|
|||
![]()
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 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
|
|||
|
|||
![]()
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 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 |
Display Modes | |
|
|
![]() |
||||
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 |