Solved

Sending emails using VBA as a background process.

Posted on 2004-09-05
14
837 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 50

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 50

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

770 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