Solved

Sending emails using VBA as a background process.

Posted on 2004-09-05
14
821 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 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…

912 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

17 Experts available now in Live!

Get 1:1 Help Now