Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   VBA to Send message from a named Mailbox (http://www.outlookbanter.com/outlook-vba/61733-vba-send-message-named-mailbox.html)

Robin9876 November 22nd 07 04:48 PM

VBA to Send message from a named Mailbox
 
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?

Sue Mosher [MVP-Outlook] November 22nd 07 05:23 PM

VBA to Send message from a named Mailbox
 
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Robin9876" wrote in message ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?


Robin9876 November 22nd 07 09:55 PM

VBA to Send message from a named Mailbox
 
How would you add the Outlook reference see it works on pc's with
Outlook 2003 or 2007 installed?

On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Sue Mosher [MVP-Outlook] November 23rd 07 12:50 AM

VBA to Send message from a named Mailbox
 
AFAIK, each user would need to do that manually. Maybe an Access forum would have other ideas.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Robin9876" wrote in message ...
How would you add the Outlook reference see it works on pc's with
Outlook 2003 or 2007 installed?

On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.



"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Robin9876 November 23rd 07 10:53 AM

VBA to Send message from a named Mailbox
 
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.

Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?

On 22 Nov, 23:50, "Sue Mosher [MVP-Outlook]"
wrote:
AFAIK, each user would need to do that manually. Maybe an Access forum would have other ideas.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Robin9876" wrote in ...
How would you add the Outlook reference see it works on pc's with
Outlook 2003 or 2007 installed?


On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Sue Mosher [MVP-Outlook] November 23rd 07 03:18 PM

VBA to Send message from a named Mailbox
 
No, for that scenario, you'd need to set the actual send account. Outlook 2007 adds a MailItem.SendUsingAccount property. For earlier versions, Outlook provides no direct way to change the account for an outgoing message. These are known workarounds using native Outlook functionality:

1) If the user has Outlook 2002/3 and is not using WordMail as the editor, you set the sending account using CommandBars techniques. See http://www.outlookcode.com/codedetail.aspx?id=889 for sample code.

2) If you're mainly concerned about replies to your message going to the correct place, add the desired reply address to the MailItem.ReplyRecipients collection.

The third-party Redemption ( http://www.dimastr.com/redemption/ ) library adds another solutions:

3) Set the RDOMail.Account property, as described at http://www.dimastr.com/redemption/rdo/RDOMail.htm

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Robin9876" wrote in message ...
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.

Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?

On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Robin9876 November 23rd 07 04:27 PM

VBA to Send message from a named Mailbox
 
As another workaround, can the Outlook Mail Profile be selected in
code and therefore is only one account to send as.

On 23 Nov, 14:18, "Sue Mosher [MVP-Outlook]"
wrote:
No, for that scenario, you'd need to set the actual send account. Outlook 2007 adds a MailItem.SendUsingAccount property. For earlier versions, Outlook provides no direct way to change the account for an outgoing message. These are known workarounds using native Outlook functionality:

1) If the user has Outlook 2002/3 and is not using WordMail as the editor, you set the sending account using CommandBars techniques. Seehttp://www.outlookcode.com/codedetail.aspx?id=889for sample code.

2) If you're mainly concerned about replies to your message going to the correct place, add the desired reply address to the MailItem.ReplyRecipients collection.

The third-party Redemption (http://www.dimastr.com/redemption/) library adds another solutions:

3) Set the RDOMail.Account property, as described athttp://www.dimastr.com/redemption/rdo/RDOMail.htm

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Robin9876" wrote in ...
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.


Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?


On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Sue Mosher [MVP-Outlook] November 23rd 07 04:48 PM

VBA to Send message from a named Mailbox
 
Not if Outlook is already running. Only one Outlook session can be running at a time.

Is Outlook really necessary to your Access application? Have you thought about using CDO for Windows to send directly through an SMTP server?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Robin9876" wrote in message ...
As another workaround, can the Outlook Mail Profile be selected in
code and therefore is only one account to send as.

On 23 Nov, 14:18, "Sue Mosher [MVP-Outlook]"
wrote:
No, for that scenario, you'd need to set the actual send account. Outlook 2007 adds a MailItem.SendUsingAccount property. For earlier versions, Outlook provides no direct way to change the account for an outgoing message. These are known workarounds using native Outlook functionality:

1) If the user has Outlook 2002/3 and is not using WordMail as the editor, you set the sending account using CommandBars techniques. Seehttp://www.outlookcode.com/codedetail.aspx?id=889for sample code.

2) If you're mainly concerned about replies to your message going to the correct place, add the desired reply address to the MailItem.ReplyRecipients collection.

The third-party Redemption (http://www.dimastr.com/redemption/) library adds another solutions:

3) Set the RDOMail.Account property, as described athttp://www.dimastr.com/redemption/rdo/RDOMail.htm

"Robin9876" wrote in ...
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.


Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?


On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Robin9876 November 23rd 07 06:19 PM

VBA to Send message from a named Mailbox
 
It is connecting to a mail server via LMAP which I thought CDO only
connects to SMTP server?

On 23 Nov, 15:48, "Sue Mosher [MVP-Outlook]"
wrote:
Not if Outlook is already running. Only one Outlook session can be running at a time.

Is Outlook really necessary to your Access application? Have you thought about using CDO for Windows to send directly through an SMTP server?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Robin9876" wrote in ...
As another workaround, can the Outlook Mail Profile be selected in
code and therefore is only one account to send as.


On 23 Nov, 14:18, "Sue Mosher [MVP-Outlook]"
wrote:
No, for that scenario, you'd need to set the actual send account. Outlook 2007 adds a MailItem.SendUsingAccount property. For earlier versions, Outlook provides no direct way to change the account for an outgoing message. These are known workarounds using native Outlook functionality:


1) If the user has Outlook 2002/3 and is not using WordMail as the editor, you set the sending account using CommandBars techniques. Seehttp://www.outlookcode.com/codedetail.aspx?id=889forsample code.


2) If you're mainly concerned about replies to your message going to the correct place, add the desired reply address to the MailItem.ReplyRecipients collection.


The third-party Redemption (http://www.dimastr.com/redemption/) library adds another solutions:


3) Set the RDOMail.Account property, as described athttp://www.dimastr.com/redemption/rdo/RDOMail.htm


"Robin9876" wrote in ...
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.


Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?


On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?



Sue Mosher [MVP-Outlook] November 23rd 07 07:55 PM

VBA to Send message from a named Mailbox
 
Do you mean IMAP, not LMAP? IMAP is a protocol for receiving messages. SMTP is the protocol used for sending.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Robin9876" wrote in message ...
It is connecting to a mail server via LMAP which I thought CDO only
connects to SMTP server?

On 23 Nov, 15:48, "Sue Mosher [MVP-Outlook]"
wrote:
Not if Outlook is already running. Only one Outlook session can be running at a time.

Is Outlook really necessary to your Access application? Have you thought about using CDO for Windows to send directly through an SMTP server?

"Robin9876" wrote in ...
As another workaround, can the Outlook Mail Profile be selected in
code and therefore is only one account to send as.


On 23 Nov, 14:18, "Sue Mosher [MVP-Outlook]"
wrote:
No, for that scenario, you'd need to set the actual send account. Outlook 2007 adds a MailItem.SendUsingAccount property. For earlier versions, Outlook provides no direct way to change the account for an outgoing message. These are known workarounds using native Outlook functionality:


1) If the user has Outlook 2002/3 and is not using WordMail as the editor, you set the sending account using CommandBars techniques. Seehttp://www.outlookcode.com/codedetail.aspx?id=889forsample code.


2) If you're mainly concerned about replies to your message going to the correct place, add the desired reply address to the MailItem.ReplyRecipients collection.


The third-party Redemption (http://www.dimastr.com/redemption/) library adds another solutions:


3) Set the RDOMail.Account property, as described athttp://www.dimastr.com/redemption/rdo/RDOMail.htm


"Robin9876" wrote in ...
I have now found out more details to the original scenario. The
default account is an Exchange Mailbox and the other account is a non-
Exchange mailbox hosted elsewhere on the WAN. Both can be configured
in Outlook.


Would the above suggestion when sending on behalf route the message
via that mail connection or go via the default?


On 22 Nov, 16:23, "Sue Mosher [MVP-Outlook]"
wrote:
Set the SentOnBehalfOfName property of the outgoing message to the mailbox alias.


"Robin9876" wrote in ...
In VBA code (from Access) what is required to create and send mail via
Outlook from a named Exchange Mailbox, where there are more than 1
Exchange Mailboxes configured in Outlook?




All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com