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

auto email

Hi
i have the following code under a afterupdate function

DoCmd.SendObject objecttype:=acSendNoObject, ObjectName:=strDocName,
outputformat:=acFormatHTML, To:=stremail, Subject:=strsubject,
MessageText:=strmessage

this creates the email and opens outlook
problem is if the user clicks the X in outlook in crashes the code
is it possible to either send the email automatically
or disable the X in outlook

thanks in advance

kevin

Dec 14 '05 #1
2 1586
Kevin:

A couple possibilities include error trapping or handling the Outlook
security warning message. I found two errors that occur when canceling the
email (there may be others). Error 2293 when canceling the Outlook
security warning and Error 2501 when closing the actual Outlook email.
Other errors would be handled in a similar fashion. An example of simple
error trapping might be:

Function SendEmail()
On Error GoTo Errorhandler

DoCmd.SendObject objecttype:=acSendNoObject, ObjectName:=strDocName,
outputformat:=acFormatHTML, To:=stremail, Subject:=strsubject,
MessageText:=strmessage

Exit_Function:
Exit Function

Errorhandler:
If Err.Number = 2293 Or Err.Number = 2501 Then Resume Next
'Other error handling here.
End Function

Regarding handling the Outlook security warning, I believe you can find more
information here:

http://www.outlookcode.com/d/sec.htm#sendkeys

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"kevcar40" <ke******@btinternet.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi
i have the following code under a afterupdate function

DoCmd.SendObject objecttype:=acSendNoObject, ObjectName:=strDocName,
outputformat:=acFormatHTML, To:=stremail, Subject:=strsubject,
MessageText:=strmessage

this creates the email and opens outlook
problem is if the user clicks the X in outlook in crashes the code
is it possible to either send the email automatically
or disable the X in outlook

thanks in advance

kevin
Dec 14 '05 #2
thank you
i will give it a go

kevin

Dec 14 '05 #3

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

Similar topics

2
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
9
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.