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

Email with MS Access and CDO: showdialog before sending

I have the following example code. I'm using CDO as I need to specify the
sender.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = my************@dot.com
objMessage.To = te*********@dot.com
objMessage.TextBody = "This is some sample message text."
objMessage.Send

which works, but I have 2 questions:

1. I added the code <<showDialog:=False>(behind objMessage.Send)
as I want to view the message before I confirm sending. The code is not
accepted.
How can I make this work?

2. I notice that emails that are being send don't end up in my 'sent box'.
Is that possible to achieve?

Thanks in advance,
john
Oct 7 '07 #1
4 6423
"john" <hg*@neckso.comwrote in
news:77**************************@cache120.multika bel.net:
I have the following example code. I'm using CDO as I need to specify
the sender.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = my************@dot.com
objMessage.To = te*********@dot.com
objMessage.TextBody = "This is some sample message text."
objMessage.Send

which works, but I have 2 questions:

1. I added the code <<showDialog:=False>(behind objMessage.Send)
as I want to view the message before I confirm sending. The code is
not accepted.
How can I make this work?

2. I notice that emails that are being send don't end up in my 'sent
box'. Is that possible to achieve?

Thanks in advance,
john
Perhaps, you are trying to use two object models interchangeably.

Typically CDO does not interact directly with Outlook or your default e-
mail program, although it may use values set in Outlook Express.
TTBOMK CDO does not include an object, property or method called
"showDialog"

It would be helpful if you tell us what you are trying to accomplish and/or
show us the whole module, using copy and paste.

--
lyle fairfield

Ceterum censeo Redmond esse delendam
Oct 7 '07 #2

"lyle fairfield" <ly******@yahoo.caschreef in bericht
news:te*****************@read2.cgocable.net...
"john" <hg*@neckso.comwrote in
news:77**************************@cache120.multika bel.net:
>I have the following example code. I'm using CDO as I need to specify
the sender.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = my************@dot.com
objMessage.To = te*********@dot.com
objMessage.TextBody = "This is some sample message text."
objMessage.Send

which works, but I have 2 questions:

1. I added the code <<showDialog:=False>(behind objMessage.Send)
as I want to view the message before I confirm sending. The code is
not accepted.
How can I make this work?

2. I notice that emails that are being send don't end up in my 'sent
box'. Is that possible to achieve?

Thanks in advance,
john

Perhaps, you are trying to use two object models interchangeably.

Typically CDO does not interact directly with Outlook or your default e-
mail program, although it may use values set in Outlook Express.
TTBOMK CDO does not include an object, property or method called
"showDialog"

It would be helpful if you tell us what you are trying to accomplish
and/or
show us the whole module, using copy and paste.

--
lyle fairfield

Ceterum censeo Redmond esse delendam
The above code (in a button's click) is all there is and that works. I'm
trying to accomplish 2 things:

1. The user needs to be able to send a message on behalf of another (not
person-related) mailbox for which he is authorised.

2. The user needs to see the message first before he confirms to send it.

With the sendobject- and Outlook mailmethods I'm not able to set the
'sender' or 'From' property.

Thanks,
john
Oct 7 '07 #3
On Oct 7, 9:36 am, "john" <h...@neckso.comwrote:
"lyle fairfield" <lylef...@yahoo.caschreef in berichtnews:te*****************@read2.cgocable.net ...
"john" <h...@neckso.comwrote in
news:77**************************@cache120.multika bel.net:
I have the following example code. I'm using CDO as I need to specify
the sender.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = myemailaddr...@dot.com
objMessage.To = testaddr...@dot.com
objMessage.TextBody = "This is some sample message text."
objMessage.Send
which works, but I have 2 questions:
1. I added the code <<showDialog:=False>(behind objMessage.Send)
as I want to view the message before I confirm sending. The code is
not accepted.
How can I make this work?
2. I notice that emails that are being send don't end up in my 'sent
box'. Is that possible to achieve?
Thanks in advance,
john
Perhaps, you are trying to use two object models interchangeably.
Typically CDO does not interact directly with Outlook or your default e-
mail program, although it may use values set in Outlook Express.
TTBOMK CDO does not include an object, property or method called
"showDialog"
It would be helpful if you tell us what you are trying to accomplish
and/or
show us the whole module, using copy and paste.
--
lyle fairfield
Ceterum censeo Redmond esse delendam

The above code (in a button's click) is all there is and that works. I'm
trying to accomplish 2 things:

1. The user needs to be able to send a message on behalf of another (not
person-related) mailbox for which he is authorised.

2. The user needs to see the message first before he confirms to send it.

With the sendobject- and Outlook mailmethods I'm not able to set the
'sender' or 'From' property.

Thanks,
john
E-mail security is set up to prevent, more-or-less, what you want to
do. I suppose you could expose the message for editing in an Access
form and include a button which would send or abort it.
(Your code requires quotation marks around literals, the to and from
addresses.)

Oct 7 '07 #4
E-mail security is set up to prevent, more-or-less, what you want to
do. I suppose you could expose the message for editing in an Access
form and include a button which would send or abort it.
(Your code requires quotation marks around literals, the to and from
addresses.)
Thanks.
About the quotation marks, I accidentally removed them while changing the
email addresses for the newsgroup post.

john
Oct 7 '07 #5

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

Similar topics

1
by: JSzucs | last post by:
I wrote a little code snipet in Asp.Net to send a default message to my outlook email address. That works fine, since the SMTP virtual server default domain is same domain as my outlook mail...
19
by: Bill | last post by:
I have searched through the posts for a question like mine but have only found much more complicated responses. On single record view of a form I have an email address field. I merely want to...
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
2
by: RedEye | last post by:
Hello, I am trying to create a class to send email via POP3 or Exchange. Everything works fine when sending via POP3 but fails when sending via exchange. Error: Could not access 'CDO.Message'...
5
by: Nick 'The Database Guy' | last post by:
It used to be possible to send email (with the DoCmd.SendObject acSendNoObject, , , "nickmcm@btinternet.com", , , "Email", "Enquiry", False command), however since 2000, Microsoft has put a...
3
by: sentiboy | last post by:
I am using the following code for sending email through mapi in VS 2005 environment: Public objSession As New MSMAPI.MAPISession Public objMessage As New MSMAPI.MAPIMessages ...
3
by: chaitanya02 | last post by:
Hi All,, I used this code to send an email to anyone, from my asp page, which accepts email address from the users of the form: Sending a text e-mail using a remote server: <% Set...
1
by: TD | last post by:
I have the code below under a button on a form. At this point am just testing how to send email from MS Access. Access is installed on a machine running WinXP Pro. I checked the box next to...
6
by: evenlater | last post by:
I'm trying to send an email from an Access procedure using CDO. I've been able to do it successfully with three different sending email addresses, but not with the email address I actually need to...
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
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,...
1
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,...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.