Solved

Sending emails using VBA as a background process.

Posted on 2004-09-05
14
813 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
  • 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 49

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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 49

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now