473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Setting From criteria when automating outlook from Access 03

Hi,

I have a form that automates an outlook e-mail, I can get the e-mail to send fine but now I need to try and change who the e-mail is from. (I have a group mailbox which I need the e-mail to go from rather than an individual.)

Is there a keyword for the from line in an outlook mail?

Here is the code I am using with my effort to guess it.

Expand|Select|Wrap|Line Numbers
  1.  Set myOutlook = CreateObject("Outlook.Application")
  2.  
  3. Set myMailItem = myOutlook.CreateItem(0)
  4. Set myAttachments = myMailItem.Attachments
  5. With myMailItem
  6.  .Display
  7.  .From "Amendments"
  8.  .recipients.Add "ESOSTS"
  9.  .recipients.Add "rson@ey.com"
  10.  .Subject = "ESO Powerkey " & MyDate
  11.  .body = "Please see attached the ESO Report for Powerkey Jobs"
  12. End With
  13. myAttachments.Add StrDoxDirectory & "ESOPKM- " & MyDate & ".rtf" 
Using Access and Outlook 2003, Thanks
Sep 24 '08 #1
2 1349
ADezii
8,834 Expert 8TB
Try the SenderName Property of the MailItem Object, as in:
Expand|Select|Wrap|Line Numbers
  1. MailItem.SenderName = "Elmer Fudd"
Sep 24 '08 #2
Try the SenderName Property of the MailItem Object, as in:
Expand|Select|Wrap|Line Numbers
  1. MailItem.SenderName = "Elmer Fudd"
Thanks for this but I can not get it to work as it comes up as property is read only.
Sep 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: MLH | last post by:
I'm looking for Access Basic code I can use with Access 2.0 to automate sending email using Outlook Express. The body text will always be "Your invoice is attached." The Attachment control on the...
3
by: Lauren Wilson | last post by:
Hi folks, We have an Access 2000 app that is highly integrated with Outlook 2000 or later. The app allows the user to send predefined emails that are created through an Access form and stored...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
3
by: Chris Thunell | last post by:
I am using vb.net to access a public folder in Outlook / Exchange Server. Whenever my program tries to access this folder i get a dialogue box saying "A Program is trying to access Outlook. Do you...
0
by: rcoutts | last post by:
I have a custom Access database that is a bulk mailing program for my small business to send emails to my customers (not spam!). Before sending mail, I export a folder in Outlook to an Access MDB...
7
by: John | last post by:
Hi I am using the following code to automate outlook from within MS Access; Dim O As Object O = CreateObject("Outlook.Application") The problem is that I am getting the following error on...
5
by: Arno R | last post by:
Hi all, I need to get at specific (shared) agenda-data from MS outlook 2003. I need every day to get the scheduled 'appointments' for some rooms to Access. In Access I will show the...
1
by: evenlater | last post by:
My client has asked for the ability to send email messages to a list of users by clicking a button on a form. This is a piece of cake to provide for our local users who have the Access...
0
by: brossyg | last post by:
I have some VBA code that creates an email in Access and sends it from Outlook. It is based on a query with a list of email addresses. It sends the first email to Outlook and then I have to manually...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.