Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2007

Tip: Looking for answers? Try searching our database.

automate "sending" email via MAPI

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
worksfire1 - 27 Jul 2007 22:50 GMT
I am trying to send a customized report to each of 650 field users that is
generated by Access.  The code creates the custom report and generates the
outlook item just fine.  But, I have one step left to automate.  The pushing
of the "Send" button 650 times was not fun today!  How can I automate the
"sending" of the 650 emails that my looping and mail code already generate?

Here is my current relevant code:
Dim EmailApp, NameSpace, EmailSend As Object
                       
               Set EmailApp = CreateObject("Outlook.Application")
               Set NameSpace = EmailApp.GetNamespace("MAPI")
               Set EmailSend = EmailApp.CreateItem(0)
               EmailSend.To = rscriteria![login id]
               EmailSend.CC = ""
               EmailSend.Subject = "Proposed Forced Pickups (w/e 08/06/07)"
               EmailSend.Body = ""
               EmailSend.Attachments.Add "\\Zion\Databases\FPU\Proposed
Forced Pickups.xls"
               EmailSend.Display
Gina Whipp - 27 Jul 2007 23:26 GMT
I think what you want may be found here:
http://www.granite.ab.ca/access/email.htm

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>I am trying to send a customized report to each of 650 field users that is
> generated by Access.  The code creates the custom report and generates the
[quoted text clipped - 18 lines]
> Forced Pickups.xls"
>                EmailSend.Display
worksfire1 - 28 Jul 2007 03:42 GMT
I looked all over the site.  It had a lot of good code, but really didn't
focus on email code.  It would always say 'insert some type of email code
here.  I just wish I knew the MAPI command.  I thought maybe saying
SendMail.Display = FALSE but I don't think that is the propery I need in
order to make it send the emails automatically without me hitting send.  It
doesn't work.

> I think what you want may be found here:
> http://www.granite.ab.ca/access/email.htm
[quoted text clipped - 21 lines]
> > Forced Pickups.xls"
> >                EmailSend.Display
Gina Whipp - 28 Jul 2007 04:01 GMT
I thought EMailSenate does what you asked for.  I thought pressing send once
was better then umpteen times.
Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>I looked all over the site.  It had a lot of good code, but really didn't
> focus on email code.  It would always say 'insert some type of email code
[quoted text clipped - 32 lines]
>> > Forced Pickups.xls"
>> >                EmailSend.Display
Tony Toews [MVP] - 28 Jul 2007 19:27 GMT
>I looked all over the site.  

See the Outlook Security Patch in Outlook 98, 2000 SP-2 and Outlook
2002 section at http://www.granite.ab.ca/access/email/outlook.htm

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Gina Whipp - 28 Jul 2007 19:39 GMT
Tony,

I missed that...  I guess I need more coffee....

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>
>>I looked all over the site.
[quoted text clipped - 3 lines]
>
> Tony
Tony Toews [MVP] - 29 Jul 2007 00:31 GMT
>I guess I need more coffee....

Not really.  It's certainly not obvious as to what that section is
about.  

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

worksfire1 - 29 Jul 2007 09:10 GMT
I may be missing it, but I do not see any MAPI code to send the Outlook
emails that Access generates without manual intervention.  I see mention of a
couple of 3rd party programs that will manage security settings so that you
are not prompted when security prompts would normally prompt up.  

I am not having any kind of message on a security-level pop up.  I am just
looking for a MAPI property that keeps you from having to review/edit/send
the hundreds of custom emails that Access generated for me.

> >I guess I need more coffee....
>
> Not really.  It's certainly not obvious as to what that section is
> about.  
>
> Tony
Gina Whipp - 29 Jul 2007 15:54 GMT
I thought this section (http://www.granite.ab.ca/access/email/mapi.htm) of
that page had something but I guess not.  Maybe someone else has some ideas.

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>I may be missing it, but I do not see any MAPI code to send the Outlook
> emails that Access generates without manual intervention.  I see mention
[quoted text clipped - 13 lines]
>>
>> Tony
Steve - 29 Jul 2007 19:57 GMT
Case in point!!

The OP posted to the newsgroup asking for help. He got six responses but no
help. He is no better off than when he started. You call yourself a
professional consultant but you left the OP high and dry and are moving on
to something else rather than break from the Arno R, John Marshall, Keith
Wilby mentality. You will NEVER convince me that this in accordance with the
principles of newsgroups!

To the OP:
I don't have an answer for you off the top of my head or I would help you
here in this thread. I am willing to research your problem until I come up
with a solution for you for a reasonable fee. If you would like my help,
contact me at my email address below.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com

>I thought this section (http://www.granite.ab.ca/access/email/mapi.htm) of
>that page had something but I guess not.  Maybe someone else has some
[quoted text clipped - 19 lines]
>>>
>>> Tony
Tony Toews [MVP] - 29 Jul 2007 21:36 GMT
>Case in point!!

Rubbish.  

>The OP posted to the newsgroup asking for help. He got six responses but no
>help. He is no better off than when he started.  

There may not be an answer in this particular situation as MS might
have deliberately not put in that functionality.

>You call yourself a
>professional consultant but you left the OP high and dry and are moving on
>to something else rather than break from the Arno R, John Marshall, Keith
>Wilby mentality.

Presumably your comment was directed at me rather than Gina as I have
a signature line telling folks where my website and blog are.

I did not leave the original poster high and dry.  I did misunderstand
the original question. But who says I'm leaving this thread?

As far as Arno R, John M and Keith W they are doing exactly the right
thing in combatting your soliciting business in the newsgroups.

> You will NEVER convince me that this in accordance with the
>principles of newsgroups!

Clearly you're incapable of realizing any morals or ethics other than
your own definition.

The newsgroups are *not* the area to solicit paying work.  You are
currently and have repeatedly violated this rule.

>To the OP:
>I don't have an answer for you off the top of my head or I would help you
>here in this thread. I am willing to research your problem until I come up
>with a solution for you for a reasonable fee. If you would like my help,
>contact me at my email address below.

To the original poster.  If you do feel like using Steve's services I
would strongly urge you to pay him only if he gets an answer.  Do not
pay him ahead of time.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Steve - 29 Jul 2007 22:27 GMT
>>Case in point!!
>
[quoted text clipped - 17 lines]
> I did not leave the original poster high and dry.  I did misunderstand
> the original question. But who says I'm leaving this thread?

If I wanted to make a comment directed to you, I would have posted the
comment under your response!!

> As far as Arno R, John M and Keith W they are doing exactly the right
> thing in combatting your soliciting business in the newsgroups.

Rules of conduct
Appropriate Language: The purpose of our communities is to exchange
technical information and expertise about Microsoft products. Please avoid
personal attacks, slurs, and profanity in your interactions.

I guees the you feel the rules do not apply to them!!!

If they think my posts violate any rules, there is a proper venue to follow.
They choose however to not follow the rules and make personal attacks and
use slurs and profanity as they track my posts.

>> You will NEVER convince me that this in accordance with the
>>principles of newsgroups!
[quoted text clipped - 14 lines]
> would strongly urge you to pay him only if he gets an answer.  Do not
> pay him ahead of time.

I work on a fixed fee basis and every customer always knows what my fees
will be before I start work. My terms of payment is ALWAYS payment is due at
the conclusion of the project.

> Tony
Tony Toews [MVP] - 30 Jul 2007 00:39 GMT
>>>You call yourself a
>>>professional consultant but you left the OP high and dry and are moving on
[quoted text clipped - 9 lines]
>If I wanted to make a comment directed to you, I would have posted the
>comment under your response!!

Oh, I'm sorry.  I thought you had made a mistake.

>> As far as Arno R, John M and Keith W they are doing exactly the right
>> thing in combatting your soliciting business in the newsgroups.
[quoted text clipped - 5 lines]
>
>I guees the you feel the rules do not apply to them!!!

>If they think my posts violate any rules, there is a proper venue to follow.
>They choose however to not follow the rules and make personal attacks and
>use slurs and profanity as they track my posts.

Advertising/Solicitation: These communities were created as a forum
for providing peer-to-peer assistance on Microsoft products and
services. We ask that you refrain from posting advertisements or
solicitations that do not pertain directly to the intended use and
purpose of the newsgroup or chat.

You brought their rebuttals to your postings on yourself.

>> To the original poster.  If you do feel like using Steve's services I
>> would strongly urge you to pay him only if he gets an answer.  Do not
[quoted text clipped - 3 lines]
>will be before I start work. My terms of payment is ALWAYS payment is due at
>the conclusion of the project.

Glad to read that.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Steve - 30 Jul 2007 01:00 GMT
>>>>You call yourself a
>>>>professional consultant but you left the OP high and dry and are moving
[quoted text clipped - 36 lines]
>
> You brought their rebuttals to your postings on yourself.

So once again, I guees the you feel the rules do not apply to them!!!

If they think my posts violate any rules, there is a proper venue to follow.
They choose however to not follow the rules and make personal attacks and
use slurs and profanity as they track my posts.

So once again, I guees the you feel the rules do not apply to them!!! You
turn a blind eye to their personal attacks, their slurs and their profanity
as they track my posts.

>>> To the original poster.  If you do feel like using Steve's services I
>>> would strongly urge you to pay him only if he gets an answer.  Do not
[quoted text clipped - 8 lines]
>
> Tony
Tony Toews [MVP] - 30 Jul 2007 01:37 GMT
>> Advertising/Solicitation: These communities were created as a forum
>> for providing peer-to-peer assistance on Microsoft products and
[quoted text clipped - 7 lines]
>
>If they think my posts violate any rules, there is a proper venue to follow.

What proper venue?  Make a complaint.

>They choose however to not follow the rules and make personal attacks and
>use slurs and profanity as they track my posts.

You're complaining about personal attacks when you are violating the
rules?

>So once again, I guees the you feel the rules do not apply to them!!! You
>turn a blind eye to their personal attacks, their slurs and their profanity
>as they track my posts.

Profanity?  Now that's not nice.

Personal attacks and slurs are very much in the eye of the beholder.

Please post the Google URL of some of those so I can make up my own
mind.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Steve - 30 Jul 2007 02:26 GMT
>>> Advertising/Solicitation: These communities were created as a forum
>>> for providing peer-to-peer assistance on Microsoft products and
[quoted text clipped - 28 lines]
> Please post the Google URL of some of those so I can make up my own
> mind.

Here's a recnt sample of the mentality you support --

By Arno R  "You are just a peace of lunatic sh.t .........."

> Tony
StopThisAdvertising - 30 Jul 2007 09:24 GMT
>>>> Advertising/Solicitation: These communities were created as a forum
>>>> for providing peer-to-peer assistance on Microsoft products and
[quoted text clipped - 32 lines]
>
> By Arno R  "You are just a peace of lunatic sh.t .........."

As I said there: I was trying to be friendly ....

Read about *your* mentality at:
http://home.tiscali.nl/arracom/whoissteve.html
(Until now  3100+ pageloads, 2100+ first-time visitors)

BTW1:
It is all very simple: just stop your advertising here ...
BTW2:
I am intending to hunt *all* of your posts again if you don't stop advertising.
When I start with that I will *not* stop as soon as the last time... Promised!

Arno R
Tony Toews [MVP] - 30 Jul 2007 01:43 GMT
>> Advertising/Solicitation: These communities were created as a forum
>> for providing peer-to-peer assistance on Microsoft products and
[quoted text clipped - 5 lines]
>
>So once again, I guees the you feel the rules do not apply to them!!!

And once again your reply was unsubstantial.   Are you or you not
posting solicitations in these newsgroups?  In my opinion you are and
thus you should stop that activity.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

StopThisAdvertising - 30 Jul 2007 01:45 GMT
> I work on a fixed fee basis and every customer always knows what my fees
> will be before I start work. My terms of payment is ALWAYS payment is due at
> the conclusion of the project.

Rubbish!! You still are, and always will be a liar !!
Read about Laura, who was a bit dissappointed....
She had to pay in advance....

<quote>
Terms:  Payment in full to start the project. Payment can be made by check
(preferred) or with credit card through PayPal at my website
</quote>

http://groups.google.nl/groups?hl=nl&lr=&selm=e%24%24go3UzEHA.3184%40TK2MSFTNGP1
0.phx.gbl


AnoR
Gina Whipp - 29 Jul 2007 21:48 GMT
Oh dear...  Your new mission in life...

I did not leave him high and dry, I thought someone else might kow his
answer and sure enough they did, see UpRiders' response.

However, this thread is still on my watch list and if that answer is not
sufficient, I have some old MAPI code (I had to dig around for it and did
not want to offer prior to locating it) that might be of help, which I will
supply for FREE, no payment, no research fees, NADA!

Feel free to follow me around, I know you are hoping to find me 'trolling'
but you won't and I don't mind the company, keeps me on my toes.

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

> Case in point!!
>
[quoted text clipped - 39 lines]
>>>>
>>>> Tony
Tony Toews [MVP] - 29 Jul 2007 20:18 GMT
>I may be missing it, but I do not see any MAPI code to send the Outlook
>emails that Access generates without manual intervention.  I see mention of a
>couple of 3rd party programs that will manage security settings so that you
>are not prompted when security prompts would normally prompt up.  

>I am not having any kind of message on a security-level pop up.  I am just
>looking for a MAPI property that keeps you from having to review/edit/send
>the hundreds of custom emails that Access generated for me.

My apologies.  Somehow I read your message that you were getting the
security warning.  

I'm not sure as I've never worked with MAPI.  I prefer to use code and
work directly through the SMTP server.

Tony

Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

UpRider - 29 Jul 2007 20:56 GMT
I believe it's
EmailSend.Send

UpRider

>I am trying to send a customized report to each of 650 field users that is
> generated by Access.  The code creates the custom report and generates the
[quoted text clipped - 18 lines]
> Forced Pickups.xls"
>                EmailSend.Display
worksfire1 - 31 Jul 2007 17:44 GMT
I added the line EmailSend.Send to my code and it seems to get me one step
closer, but no cigar!  It generates the custom email with the body, subject,
sender, and attachment I desire, but when it gets to the EmailSend.Send line,
a pop-up opens up asking me if I really want to send this?  I am sure I can
find a way to get around the pop-up so that I don't have to manually click
"Yes" I really want to send this, but when I manually click it, it still
doesn't send it.  It just leaves the message on the screen still waiting for
me to hit "Send".  Odd, puzzingly, what am I missing??

> I believe it's
> EmailSend.Send
[quoted text clipped - 23 lines]
> > Forced Pickups.xls"
> >                EmailSend.Display
worksfire1 - 31 Jul 2007 18:10 GMT
Hmm, I had commented out where you set the item back to nothing.  Now that I
uncommented that, it really seems like it is actually ABOUT to send my email
without my manual intervention, but at the last step, after I say "Yes, it is
okay to send these emails, it is not a virus" to the security pop-up, an
error message pops up stating "Outlook does not recognize one or more names."
I go to "Debug" and hit has high-lighted the new line of code
"EmailSend.Send"  Why does outlook not recognize this????  It recognizes
everything else enough to create the mail item, receipients, subject, body
and attachments correctly.  Am I not declaring enough or properly?

Here is my code as it stands:
Private Sub test_click()
Dim EmailApp, NameSpace, EmailSend As Object
                       
               Set EmailApp = CreateObject("Outlook.Application")
               Set NameSpace = EmailApp.GetNamespace("MAPI")
               Set EmailSend = EmailApp.CreateItem(0)
                       
               EmailSend.To = "heather.sawyer@kci1.com"
               EmailSend.CC = "This is a test to see if the email can be
sent automatically w/o having to hit 'Send'."
               EmailSend.Subject = "Final Forced Pickups (w/e 07/30/07)"
               EmailSend.Body = "test if sent."
               EmailSend.Attachments.Add "\\Zion\Databases\FPU\Final Forced
Pickups.xls"
               'EmailSend.Display
               EmailSend.Send
                       
               Set EmailApp = Nothing
               Set NameSpace = Nothing
               Set EmailSend = Nothing

MsgBox "Process complete."
End Sub

> I added the line EmailSend.Send to my code and it seems to get me one step
> closer, but no cigar!  It generates the custom email with the body, subject,
[quoted text clipped - 32 lines]
> > > Forced Pickups.xls"
> > >                EmailSend.Display
Gina Whipp - 31 Jul 2007 18:15 GMT
I believe what's happening is what Tony refered to earlier in his response
regarding the new, improved (and annoying) security feature in Outllook.  I
use: http://www.contextmagic.com/express-clickyes/ to get around that.
There are two versions o that page and one is free of charge.

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>I added the line EmailSend.Send to my code and it seems to get me one step
> closer, but no cigar!  It generates the custom email with the body,
[quoted text clipped - 39 lines]
>> > Forced Pickups.xls"
>> >                EmailSend.Display
worksfire1 - 31 Jul 2007 18:30 GMT
Yeah, I went and installed ClickYesPro, but now my problem is that Outlook
doesn't recognize the line that UpRider suggested "EmailSend.Send"

> I believe what's happening is what Tony refered to earlier in his response
> regarding the new, improved (and annoying) security feature in Outllook.  I
[quoted text clipped - 44 lines]
> >> > Forced Pickups.xls"
> >> >                EmailSend.Display
Gina Whipp - 31 Jul 2007 18:43 GMT
Did that happen after installed ClickYesPro ?

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

> Yeah, I went and installed ClickYesPro, but now my problem is that Outlook
> doesn't recognize the line that UpRider suggested "EmailSend.Send"
[quoted text clipped - 57 lines]
>> >> > Forced Pickups.xls"
>> >> >                EmailSend.Display
worksfire1 - 31 Jul 2007 18:36 GMT
I got it to work!!

Thanks UpRider.  I just had to comment out EmailSend.Display and add your
line EmailSend.Send and get the ClickYesPro program Gina directed me to, in
order to get around security prompts.

> I am trying to send a customized report to each of 650 field users that is
> generated by Access.  The code creates the custom report and generates the
[quoted text clipped - 15 lines]
> Forced Pickups.xls"
>                 EmailSend.Display
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.