![]() |
| 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. |
|
|||||||
| Tags: message, outlook, programmatically, sending |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am building automated email messaging, populating the Subject, message and
recipients from within my application. I need to popultat the From: also, does anyone know how to code this? |
| Ads |
|
#2
|
|||
|
|||
|
Populate the From with what value? In what version of Outlook?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "dmklaus" wrote in message ... I am building automated email messaging, populating the Subject, message and recipients from within my application. I need to popultat the From: also, does anyone know how to code this? |
|
#3
|
|||
|
|||
|
Outlook 2003, the sender would be a mailbox (for example:
) "dmklaus" wrote: I am building automated email messaging, populating the Subject, message and recipients from within my application. I need to popultat the From: also, does anyone know how to code this? |
|
#4
|
|||
|
|||
|
An Exchange mailbox? In that case, assign the mailbox alias or SMTP address to the MailItem.SentOnBehalfOfName property.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "dmklaus" wrote in message ... Outlook 2003, the sender would be a mailbox (for example: ) "dmklaus" wrote: I am building automated email messaging, populating the Subject, message and recipients from within my application. I need to popultat the From: also, does anyone know how to code this? |
|
#5
|
|||
|
|||
|
Here's some sample code I use in Excel to send emails using Outlook.
Dim Outlook As Outlook.Application Dim OutlookMsg As Outlook.MailItem Dim OutlookRecip As Outlook.Recipient Dim OutlookAttach As Outlook.Attachment Set Outlook = CreateObject("outlook.application") Set OutlookMsg = Outlook.CreateItem(olMailItem) With OutlookMsg .SentOnBehalfOfName = " .ReplyRecipients.Add ") .Subject = "Read me!" .Importance = olImportanceHigh .Sensitivity = olConfidential .BodyFormat = olFormatHTML .HTMLBody = "Your message here" Set OutlookRecip = ") OutlookRecip.Type = olTo Set OutlookAttach = .Attachments.Add("C:\Documents And Settings\username\Desktop\filename.xls") .Send ' or .Display if you want to preview the message 'destroy variables Set OutlookRecip = Nothing Set OutlookAttach = Nothing Set OutlookMsg = Nothing Set Outlook = Nothing Beware Outlook security warning! HTH, JP On Nov 2, 9:23 am, dmklaus wrote: Outlook 2003, the sender would be a mailbox (for example: ) "dmklaus" wrote: I am building automated email messaging, populating the Subject, message and recipients from within my application. I need to popultat the From: also, does anyone know how to code this?- Hide quoted text - - Show quoted text - |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programmatically sending email via Outlook COM Add-In | pollyanna65 | Add-ins for Outlook | 6 | January 29th 07 05:47 PM |
| How can I programmatically display an email message saved in a msg file? | Clive | Outlook - Using Forms | 1 | November 29th 06 10:39 PM |
| Programmatically sending email from Access | scariharry | Outlook and VBA | 0 | July 5th 06 06:08 PM |
| Sending a test message works; sending a message doesn't? | NancyTG | Outlook - Installation | 9 | June 22nd 06 05:00 PM |
| Error message when sending message in Outlook | Vikes | Outlook - General Queries | 0 | February 17th 06 11:02 PM |