Can I Use "Run a Script" for Rules without Getting Security Messag

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Outlook 2003, and I have setup a rule to run a script for every
e-mail that comes in. The script runs and works fine, but I get a security
dialog that I have to dismiss every time the script runs. Is there some way
to keep this dialog from appearing without using Outlook Redemption or
something like it? The script I am running is already in the General section
of the code for ThisOutlookSession. Thanks.
 
Here's my script. It will do a lot more eventually, but I want to get rid of
the security message before I start loading it with code. I get a security
message for every e-mail that hits the Inbox, so it doesn't appear to have
anything to do with the code in the Received subroutine. Thanks.

Public Sub InventoryScript(outlookMailItem As Outlook.mailItem)

With outlookMailItem

Select Case UCase(.SenderEmailAddress)

Case UCase("(e-mail address removed)"):

If InStr(UCase(.Subject), UCase("Sold, ship now.")) <> 0 Then

Received

End If

Case Else:

End Select

End With

End Sub
 
The solution in your case is the change the rule so that the rule itself
checks for the sender address. That way all you're code will have to do is
check the Subject. If you have multiple senders that you want to do
different things with, you would need multiple rules.

The alternative is to use Redemption to get the sender address.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
So the .SendEmailAddress and .Subject properties have different security
levels? That would seem to be the case if I can check the .Subject without
getting a security message, but I have to check the .SendEmailAddress in a
rule to keep from getting the message. I'll give it a try. Thanks.
 
Think about it: The whole point of the object model guard security prompts
is to prevent address harvesting and virus propagation. In that context,
Subject -- like most properties -- is innocuous.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Makes sense, just never really thought about it, I guess. Of course, the real
question is does it work... Well, I changed my script, and now it works like
a charm, no security messages. Thanks a bazillion, Madame Outlook.
 
Back
Top