473,396 Members | 1,805 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,396 software developers and data experts.

Help with error in trying to email from Access...

Hey everyone,

I'm trying to email from access and i want email the contents of one
field with a subject of another to the owner of a final field.

I think i've referred to everything correctly in the ocde below but I
get an error message:

Run-time error '-2147352567 (800200009)':

The operation failed.

This appears after the message "A program is trying yo access
email..." to which i say yes.

I'm using Access XP with all the relevant libraries referenced.

Thanks.

*************Begin Code************
Private Sub Command44_Click()

Dim myOlApp, myMessage

Set myOlApp = CreateObject("Outlook.Application")
Set myMessage = myOlApp.CreateItem(olMailItem)

With myMessage
..Recipients = Me.ThingyOwner
..Resolve
..Subject = Me.ThingyTitle
..Body = Me.ThingyDescription
End With
myMessage.Send

Set myOlApp = Nothing

End Sub
*************End Code************
Nov 13 '05 #1
1 1515

Robert McGregor wrote:
Hey everyone,

I'm trying to email from access and i want email the contents of one
field with a subject of another to the owner of a final field.

I think i've referred to everything correctly in the ocde below but I
get an error message:

Run-time error '-2147352567 (800200009)':

The operation failed.

This appears after the message "A program is trying yo access
email..." to which i say yes.

I'm using Access XP with all the relevant libraries referenced.

Thanks.

*************Begin Code************
Private Sub Command44_Click()

Dim myOlApp, myMessage

Set myOlApp = CreateObject("Outlook.Application")
Set myMessage = myOlApp.CreateItem(olMailItem)

With myMessage
.Recipients = Me.ThingyOwner
.Resolve
.Subject = Me.ThingyTitle
.Body = Me.ThingyDescription
End With
myMessage.Send

Set myOlApp = Nothing

End Sub
*************End Code************


Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
2
by: Joe | last post by:
Hello All, I am trying to insert a record in the MS Access DB and for some reason I cannot get rid of error message, System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. ...
20
by: RWC | last post by:
Hi Folks, I have a windows 2000 server installation, IIS is running and the ASP.NET 1.1 SDK has been installed. I'm reading a book on ASP.NET and the lessons call for the first line to read <%@...
1
by: Joe | last post by:
Hello All, I am trying to insert a record in the MS Access DB and for some reason I cannot get rid of error message, System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. ...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
6
by: phamn1985 | last post by:
I m trying to make a login page via Microsoft access. This is my table .. Table name : tblLogin PK : loginID(Auto number) Attributes : username , password. I make a login form in Microsoft...
1
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
47
by: Jo | last post by:
Hi there, I'm Jo and it's the first time I've posted here. I'm in process of creating a database at work and have come a little unstuck.....I'm a bit of a novice and wondered if anyone could...
12
by: =?Utf-8?B?ZGdvdw==?= | last post by:
I designed a "contact_us" page in visual web developer 2005 express along with EW2 after viewing tutorials on asp.net's help page. Features work like they should, but I cannot figure out how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.