D
Dwight
I have a script that runs when a message arrives that sends a reply message
back to the sender. I have two issues that I need to resolve.
1. The mailbox that the rule is setup on is an office mailbox that does not
get logged into. All the office personnel has the mailbox listed as an
additional mailbox. How can I get the rule to run a script without actually
logging into the mailbox?
2. How do I avoid having to manually respond to the message prompts that is
displayed each time a reply is sent. The 2 prompts that I get are:
- A program is trying access email address you have stored in outlook... I
have to click "YES"
- A classification prompt that I click "SEND" again.
Here is the code that I am using:
Sub RunMessageReply(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim rpl as Outlook.MailItem
strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
Set rpl = msg.Reply
rpl.Body = "This is a test of the message reply function" & vbCrLf &
rpl.Body
rpl.Send
Set msg = Nothing
Set olNS = Nothing
End Sub
Thanks in advance!
Dwight
back to the sender. I have two issues that I need to resolve.
1. The mailbox that the rule is setup on is an office mailbox that does not
get logged into. All the office personnel has the mailbox listed as an
additional mailbox. How can I get the rule to run a script without actually
logging into the mailbox?
2. How do I avoid having to manually respond to the message prompts that is
displayed each time a reply is sent. The 2 prompts that I get are:
- A program is trying access email address you have stored in outlook... I
have to click "YES"
- A classification prompt that I click "SEND" again.
Here is the code that I am using:
Sub RunMessageReply(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim rpl as Outlook.MailItem
strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
Set rpl = msg.Reply
rpl.Body = "This is a test of the message reply function" & vbCrLf &
rpl.Body
rpl.Send
Set msg = Nothing
Set olNS = Nothing
End Sub
Thanks in advance!
Dwight