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

Message Prompts with Auto Reply



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 18th 07, 05:28 PM posted to microsoft.public.outlook.program_vba
Dwight
external usenet poster
 
Posts: 6
Default Message Prompts with Auto Reply

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 a

- 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

Ads
  #2  
Old April 18th 07, 06:02 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Message Prompts with Auto Reply

1) You can't. You'll need to use a different approach, such as VBA code to subscribe to that folder's Items.ItemAdd event, or an Exchange event sink.

2) Tell us the security mode from the Help | About Microsoft Outlook dialog.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dwight" wrote in message ...
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 a

- 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

  #3  
Old April 18th 07, 06:16 PM posted to microsoft.public.outlook.program_vba
Dwight
external usenet poster
 
Posts: 6
Default Message Prompts with Auto Reply

Sue,
Thanks for quick response!

The security mode is default

I have developed several VBA aplications in MS Access, but this is my first
time coding in Outlook and I feel a little lost. How do I use VBS code to
subscribe to the folder's Items.ItemAdd event, or the Exchange event sink,
and how do I get this mailbox to send a reply to every email received?

Thank you!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

1) You can't. You'll need to use a different approach, such as VBA code to subscribe to that folder's Items.ItemAdd event, or an Exchange event sink.

2) Tell us the security mode from the Help | About Microsoft Outlook dialog.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dwight" wrote in message ...
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 a

- 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


  #4  
Old April 19th 07, 12:21 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Message Prompts with Auto Reply

See http://www.outlookcode.com/d/code/zaphtml.htm for an example of that event. You'd use the GetSharedDefaultFolder instead of GetDefaultFolder to return the folder you want to monitor.

Programming Exchange is an entirely different matter. Start at http://msdn.microsoft.com/exchange/.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dwight" wrote in message ...
Sue,
Thanks for quick response!

The security mode is default

I have developed several VBA aplications in MS Access, but this is my first
time coding in Outlook and I feel a little lost. How do I use VBS code to
subscribe to the folder's Items.ItemAdd event, or the Exchange event sink,
and how do I get this mailbox to send a reply to every email received?

Thank you!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

1) You can't. You'll need to use a different approach, such as VBA code to subscribe to that folder's Items.ItemAdd event, or an Exchange event sink.

2) Tell us the security mode from the Help | About Microsoft Outlook dialog.



"Dwight" wrote in message ...
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 a

- 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


  #5  
Old April 19th 07, 03:28 PM posted to microsoft.public.outlook.program_vba
Dwight
external usenet poster
 
Posts: 6
Default Message Prompts with Auto Reply

Thank you but I am still confused.
I do not see in the code where I specify the shared mailbox.
What makes this run without physically logging into the mailbox?

Thanks again!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/code/zaphtml.htm for an example of that event. You'd use the GetSharedDefaultFolder instead of GetDefaultFolder to return the folder you want to monitor.

Programming Exchange is an entirely different matter. Start at http://msdn.microsoft.com/exchange/.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dwight" wrote in message ...
Sue,
Thanks for quick response!

The security mode is default

I have developed several VBA aplications in MS Access, but this is my first
time coding in Outlook and I feel a little lost. How do I use VBS code to
subscribe to the folder's Items.ItemAdd event, or the Exchange event sink,
and how do I get this mailbox to send a reply to every email received?

Thank you!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

1) You can't. You'll need to use a different approach, such as VBA code to subscribe to that folder's Items.ItemAdd event, or an Exchange event sink.

2) Tell us the security mode from the Help | About Microsoft Outlook dialog.



"Dwight" wrote in message ...
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 a

- 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



  #6  
Old May 8th 07, 05:23 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Message Prompts with Auto Reply

The code sample I suggested uses the Namespace.GetDefaultFolder method to return a folder in the user's own mailbox so it can be enabled for events. If you want to write event handlers for a folder in another mailbox, use GetSharedDefaultFolder instead to return it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dwight" wrote in message ...
Thank you but I am still confused.
I do not see in the code where I specify the shared mailbox.
What makes this run without physically logging into the mailbox?

Thanks again!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/code/zaphtml.htm for an example of that event. You'd use the GetSharedDefaultFolder instead of GetDefaultFolder to return the folder you want to monitor.

Programming Exchange is an entirely different matter. Start at http://msdn.microsoft.com/exchange/.



"Dwight" wrote in message ...
Sue,
Thanks for quick response!

The security mode is default

I have developed several VBA aplications in MS Access, but this is my first
time coding in Outlook and I feel a little lost. How do I use VBS code to
subscribe to the folder's Items.ItemAdd event, or the Exchange event sink,
and how do I get this mailbox to send a reply to every email received?

Thank you!

Dwight


"Sue Mosher [MVP-Outlook]" wrote:

1) You can't. You'll need to use a different approach, such as VBA code to subscribe to that folder's Items.ItemAdd event, or an Exchange event sink.

2) Tell us the security mode from the Help | About Microsoft Outlook dialog.



"Dwight" wrote in message ...
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 a

- 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



 




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
How to include info of received email in auto reply message? ml@bombay Outlook - Installation 0 December 14th 06 09:43 PM
Get parent message (original) from the response created by Reply-All/Reply/Forward Sanjay Add-ins for Outlook 3 November 9th 06 06:02 PM
Auto reply [email protected] Outlook - General Queries 3 September 27th 06 09:10 PM
Auto reply using message rules sends as attachment qersoft Outlook Express 3 May 21st 06 12:13 AM
auto reply GT Outlook Express 3 February 17th 06 08:09 PM


All times are GMT +1. The time now is 07:11 AM.


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.