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

Send As Property Outlook VBA



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old March 15th 06, 04:12 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Send As Property Outlook VBA

If you're referring to an Exchange mailbox, use the MailItem.SentOnBehalfOfName property.

--
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


wrote in message oups.com...
Hello all,

Is there a VBA property for a mailitem to change the Send As field? I
would like for the email to come from my team's group mailbox and not
the user who is running the script. My test code as follows.
The SenderEmailAddress property returns a Read-only run-time error.


Sub TestEmail()
Dim position As Long
Dim OLobj As Object
Dim Mailobj As Object
Dim BodyStr As String
Dim SectStr As String


Set OLobj = CreateObject("Outlook.Application")
Set Mailobj = OLobj.CreateItem(olMailItem)
With Mailobj
'.Senderemailaddress = "
.To =
.Subject = "Testing VBA"
.Body = "Testing"
.Send
End With

Set Mailobj = Nothing
Set OLobj = Nothing

End Sub

Thanks in advanced,

Matt

 




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
VBA Code to put in Access that will send an Email with Attachments [email protected] Outlook and VBA 1 April 9th 06 05:30 PM
Background Color for Outlook Property Page paulmcd Add-ins for Outlook 2 February 15th 06 07:38 AM
How to validate a Custom Property Page Jack Zhang Add-ins for Outlook 1 February 9th 06 07:22 PM
SafeItem.TO property is empty when the recipient is in address Martin Outlook and VBA 0 January 25th 06 11:13 AM
How to change Categories property of recurring apointment? deko Outlook and VBA 3 January 23rd 06 06:18 AM


All times are GMT +1. The time now is 03: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.