Solved

Sending emails using VBA as a background process.

Posted on 2004-09-05
14
887 Views
Last Modified: 2008-01-09
Hi Experts.,

I want to write a program in VBA to send emails and display a message box.I can do it by pressing a button in a form.
But my requirement is to send emails and display messagebox as a background process.Without user interaction.
I want to put that into a windows schedule.
How can I do such thing using VBA.
Please help me asap.

Thanks
0
Comment
Question by:lalithaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
14 Comments
 
LVL 10

Expert Comment

by:anv
ID: 11987307
this process should start in reference to some event right??

what would that event be could you tell me??

and please give the detail when and how u want to send the mail, in your application??

do you want to use Outlook or what???
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 11987372
check this out:

vbSendMail.dll Version 3.65-- Easy E-mail Sending in VB, with Attachments
http://www.freevbcode.com/ShowCode.Asp?ID=109
0
 
LVL 1

Author Comment

by:lalithaw
ID: 11987802
Thanks for ur comments.
I am writing a personal diary like program using VBA.There I want to send reminders to each appointments by email or by displaying messagebox.
I hope to use cdont object.And that reminder application should be written in VBA not VB.
ryancys:  that vbsendmaill.dll cant use for my application.This should not be a complecated one.just a small application.But problem is I dont know how to run VBA application in background.
I can write it to send mails by pressing button in front end.
But I dont know how to run VBA application in background.

txs

 
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:anv
ID: 11987849
check this link to send mail using CDONTS

http://www.tek-tips.com/viewthread.cfm?qid=901845

one thing u must keep in mind...that CDONTS will work only on win2k OS not on win 98 etc..

0
 
LVL 10

Expert Comment

by:anv
ID: 11987878
this link fro running ur application in the background..

http://www.andreavb.com/forum/viewtopic_2116.html
0
 
LVL 1

Author Comment

by:lalithaw
ID: 11987927
Thanks anv.

I cant have a exe file in MS Access (VBA) applications.if so I could run it in background by putting it to a schedule.
My requirement is how to run VBA application in background.That file extension will be .mdb.

Please reply asap.

txs
0
 
LVL 10

Accepted Solution

by:
anv earned 225 total points
ID: 11988011
lalithaw

Of Course, u can have an exe for MS Access (VBA)...
to create and executable of ur MS Access do following...

in ur MS Access window...
goto Tools ->Database Utilities -> make MDE file..

give the extension to save ur file..

an executable for Ms Access files is .MDE...

u can run this in the background... now..
Cheers.. :))
0
 
LVL 52

Assisted Solution

by:Ryan Chong
Ryan Chong earned 225 total points
ID: 11988044
>>I cant have a exe file in MS Access (VBA) applications.if so I could run it in background by putting it to a schedule.
You can try create a VBScript file (.vbs) that connect to your Access database, and do whatever you want afterwards..
0
 
LVL 1

Author Comment

by:lalithaw
ID: 11988173
I tried it and created the mde file and ran it.
But there it is displaying MS Access enviorenment to the user.
Cant we do that without displaying to user.
Yes VB script can do that easily.But I have restrictions only can use VBA.
0
 
LVL 7

Assisted Solution

by:_agj_
_agj_ earned 50 total points
ID: 11995896
in the mde's vba code, have an 'application.visible=false'
0
 
LVL 1

Author Comment

by:lalithaw
ID: 12003020
agj.,

Could u tell me where do I have put 'application.visible=false'

txs
0
 
LVL 1

Author Comment

by:lalithaw
ID: 12562263
Hi DanRollins.,

Lot of experts has posted comments.Thanks for every one.
But I couldnt get a comment to solve my problem.Finaly I found a method to solve that problem from one of my friend.
So can u split the points between all experts helped me by posting comments.

Txs
Lalitha
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question