Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Send Email using access
Randy Stockton 
    
2 years ago
When I send an email, it is currently sending from my personal account.  <B>How do I chose which account access emails from?</B>  I don't need to change it once I set it to the email address that I want.
Jennifer Neighbors  @Reply  
     
2 years ago
Are you using MS Outlook to send? If so, it will default to your primary email account to send from. You can change it, but it requires a bit of fancy VBA. I have an app that does this and will look up the procedure for you. It will take me a few minutes to find and copy it.
Jennifer Neighbors  @Reply  
     
2 years ago
Dim oOutlook As Object, oOutlookAccount As Object
Dim varAccount as Variant

If Not IsNull(Me.FromEmailAddress) And Me.FromEmailAddress <> "" Then
        varAccount = Me.FromEmailAddress
        For Each oOutlookAccount In oOutlook.Session.Accounts
               If oOutlookAccount = varAccount Then
                     Set .SendUsingAccount = oOutlookAccount
               End If
         Next
End If

Randy - This is inside a big loop of code to send bulk email and I hope I have selected the relevant lines of code you need. The "from" email address is stored in a form field named FromEmailAddress. It must be a valid Outlook email account in Outlook, or this code will throw an error when you execute it. In my app it works so the user can select which of their accounts to use as the "from" address.
Randy Stockton OP  @Reply  
    
2 years ago
Thank you so much
Garry Smith  @Reply  
    
2 years ago
Thanks Jennifer Neighbors. This could become very handy.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/16/2026 7:51:16 PM. PLT: 1s