Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #9962

Re: Access 2013 and sending an email.

From Neil <xxx@gmail.com>
Newsgroups comp.databases.ms-access
Subject Re: Access 2013 and sending an email.
Date 2014-10-03 01:05 -0500
Organization A noiseless patient Spider
Message-ID <542E3CA2.6040005@gmail.com> (permalink)
References <076e8a04-1f71-4d6a-a933-357b195bf2b0@googlegroups.com>

Show all headers | View raw


On 10/2/2014 12:59 PM, Patrick Finucane wrote:
> I'm getting something goofy when I automate an email from Access 2013.  Outlook is not open at this point.  I press a command button on the form to send an email.  The code assigns the email elements (Subject, attachment, To, etc) correctly and displays the email prior to sending.  All is good at this point.  I then press the SEND buttonin Outlook and the email closes.  My code looks like this
>          If DisplayEmail Then
>              .Display
>          Else
>              .Save
>              .Send
>          End If
>
> After pressing the Send button in Outlook, the Outlook email message is closed.  I am sending the message to myself for testing.  I will wait forever and no message appears in my inbox.  The message will ONLY appear when I open up Outlook.  It seems doing so releases the message.
>
> How can I send an email when Outlook is closed initially?  I assume I don't have a property setting set correctly.
>

Patrick,

Where are you looking for the message? If Outlook isn't opened (and only 
the Outlook Message is displayed), then how would you know whether 
you've received it or not? Are you using another e-mail reader to look 
for the message? Looking for it online?

Also, when happens if DisplayEmail is False? Does the code send the 
e-mail OK? Or is it not sent with that option either?

For me, whenever I automate Outlook, I create an application object and 
then the message object, rather than just creating a new message 
directly. I find that that works better, but YMMV. Also, if the user 
already has Outlook open, I can just get that instance and use it, 
instead of opening a new instance.

Neil

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-02 10:59 -0700
  Re: Access 2013 and sending an email. Norman Peelman <npeelman@cfl.rr.com> - 2014-10-02 19:52 -0400
    Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-03 06:06 -0700
      Re: Access 2013 and sending an email. Norman Peelman <npeelman@cfl.rr.com> - 2014-10-04 08:58 -0400
        Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-06 06:25 -0700
          Re: Access 2013 and sending an email. JB Guernsey <jeff@angelsystems.co.uk> - 2014-10-06 07:58 -0700
            Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-06 09:27 -0700
              Re: Access 2013 and sending an email. JB Guernsey <jeff@angelsystems.co.uk> - 2014-10-06 10:24 -0700
                Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-06 10:35 -0700
                Re: Access 2013 and sending an email. JB Guernsey <jeff@angelsystems.co.uk> - 2014-10-06 13:19 -0700
  Re: Access 2013 and sending an email. Neil <xxx@gmail.com> - 2014-10-03 01:05 -0500
    Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-03 06:13 -0700
      Re: Access 2013 and sending an email. Neil <xxx@gmail.com> - 2014-10-03 14:31 -0500
        Re: Access 2013 and sending an email. Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-10-06 06:14 -0700
  Re: Access 2013 and sending an email. fmsinc <fmsinc@gmail.com> - 2014-10-10 15:44 -0500

csiph-web