Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sending emails using VBA as a background process.

Posted on 2004-09-05
14
Medium Priority
?
980 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
12 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 54

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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 675 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 54

Assisted Solution

by:Ryan Chong
Ryan Chong earned 675 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 150 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

783 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