A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sending email from Access



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2010, 07:40 PM posted to microsoft.public.access
Song[_4_]
external usenet poster
 
Posts: 43
Default sending email from Access

I use reference to Microsoft outlook 12.0 Object Library. (Access
2007)

Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String

Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)

Set objMail = Nothing
Set olApp = Nothing

The above code has no problem for Access 2007. My questions a
1. What if users upgrade to Office 2010? Do I have to change the code?
2. What if users do not use Outlook, instead, they use Windows Live
Mail? How do I change the code?

Thanks.

Song
  #2  
Old June 2nd, 2010, 08:35 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default sending email from Access

You're best off using Late Binding so that you don't need to set a reference
to a specific version.

Tony Toews has an introduction to the topic at
http://www.granite.ab.ca/access/latebinding.htm

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)

"Song" wrote in message
...
I use reference to Microsoft outlook 12.0 Object Library. (Access
2007)

Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String

Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)

Set objMail = Nothing
Set olApp = Nothing

The above code has no problem for Access 2007. My questions a
1. What if users upgrade to Office 2010? Do I have to change the code?
2. What if users do not use Outlook, instead, they use Windows Live
Mail? How do I change the code?

Thanks.

Song



 




Thread Tools
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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.