W
Walter
My first attempt at outlook VB:
To get my feet wet I decided to use Knowledge Base
Article - 306108 code to test the scripting of rules. I
added the following sub to the "This Outlook Session"
Module.
I then set up a rule applying to all arriving messages
and clicked script and referenced the below sub.
Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject & "
from: " & Item.SenderName
End Sub
I never get a message box.
I followed the following procedure from Sue Mosher's
Outlook article
http://www.win2000mag.net/Articles/Index.cfm?
ArticleID=22950
To create the rule that uses the subroutine, follow these
steps:
1. Click Tools, Rules Wizard.
2. In the first Rules Wizard dialog box, click New.
3. Select Start from a blank rule, then select Check
messages when they arrive; click Next.
4. From the What condition(s) do you want to check?
list, select the conditions you want to apply to this
rule. If you want to convert all incoming HTML messages
to plain text, click Next without setting any conditions
and answer Yes when Outlook asks whether you want the
rule to apply to every message you receive.
5. From the What do you want to do with the message?
list, select run a script.
6. In the Rule description box at the bottom of the
Rules Wizard dialog box, click the underlined words a
script.
7. In the Select Script dialog box, select
Project1.ConvertHTMLToDefault, then click OK.
8. Click Next and add any exceptions to the rule
(e.g., mailing lists that you prefer to receive in HTML
format). Click Next again.
9. Give the rule a name, then click Finish. Click OK
to close the Rules Wizard.
And I substituted Sue Mosher's reference to the
variable "objMsg As MailItem"
So this code was also tried
Sub CustomMailMessageRule(objMsg As MailItem)
MsgBox "Mail message arrived: " & objMsg.Subject & "
from: " & objMsg.SenderName
End Sub
I have Office XP Developer installed. I also run Norton
Anti-Virus.
The Office XP & Developer were clean install's on a newly
formatted HD and Windows XP (home).
Ultimately I hope to automate the exchange of table
updates in Access via an automated process of sending and
receiving updates; then applying the updates to both
sides. For this test, I am not working from within
Access, just Outlook 2002.
Thanks
To get my feet wet I decided to use Knowledge Base
Article - 306108 code to test the scripting of rules. I
added the following sub to the "This Outlook Session"
Module.
I then set up a rule applying to all arriving messages
and clicked script and referenced the below sub.
Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject & "
from: " & Item.SenderName
End Sub
I never get a message box.
I followed the following procedure from Sue Mosher's
Outlook article
http://www.win2000mag.net/Articles/Index.cfm?
ArticleID=22950
To create the rule that uses the subroutine, follow these
steps:
1. Click Tools, Rules Wizard.
2. In the first Rules Wizard dialog box, click New.
3. Select Start from a blank rule, then select Check
messages when they arrive; click Next.
4. From the What condition(s) do you want to check?
list, select the conditions you want to apply to this
rule. If you want to convert all incoming HTML messages
to plain text, click Next without setting any conditions
and answer Yes when Outlook asks whether you want the
rule to apply to every message you receive.
5. From the What do you want to do with the message?
list, select run a script.
6. In the Rule description box at the bottom of the
Rules Wizard dialog box, click the underlined words a
script.
7. In the Select Script dialog box, select
Project1.ConvertHTMLToDefault, then click OK.
8. Click Next and add any exceptions to the rule
(e.g., mailing lists that you prefer to receive in HTML
format). Click Next again.
9. Give the rule a name, then click Finish. Click OK
to close the Rules Wizard.
And I substituted Sue Mosher's reference to the
variable "objMsg As MailItem"
So this code was also tried
Sub CustomMailMessageRule(objMsg As MailItem)
MsgBox "Mail message arrived: " & objMsg.Subject & "
from: " & objMsg.SenderName
End Sub
I have Office XP Developer installed. I also run Norton
Anti-Virus.
The Office XP & Developer were clean install's on a newly
formatted HD and Windows XP (home).
Ultimately I hope to automate the exchange of table
updates in Access via an automated process of sending and
receiving updates; then applying the updates to both
sides. For this test, I am not working from within
Access, just Outlook 2002.
Thanks