Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
Reply
 
Thread Tools Rating: Thread Rating: 15 votes, 5.00 average. Display Modes
Old 05-13-2015, 04:23 PM   #16
znxm0i
Newly Registered User
 
Join Date: May 2015
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
znxm0i is on a distinguished road
Re: Access 2010 Email Macro

Hello Trevor,

I just wanted to drop a line to let you know that I finally got the macro to work with the modules. I kept searching the internet for answers and someone was nice enough to tell me that I needed to change the Sub routine to a Function and then call that module, which in turn would call the GetBoiler function. Viola! now it runs like a charm.

Again, thank you so much for helping me get as far as I did. You've helped make the automation of running a daily report so much more easier for this Administrative Assistant and I couldn't be happier.

Take care!

znxm0i is offline   Reply With Quote
Old 05-14-2015, 10:46 AM   #17
Trevor G
AWF - Happy to help
 
Trevor G's Avatar
 
Join Date: Oct 2009
Location: Tamworth, Staffordshire
Posts: 2,326
Thanks: 4
Thanked 227 Times in 218 Posts
Trevor G will become famous soon enough Trevor G will become famous soon enough
Re: Access 2010 Email Macro

Add a button to a form and then in the event tab select On Click the 3 dots and select Code Builder then in the code type in the name of the sub routine (between the Sub and End Sub lines) which is sendForApproval1

So something like this, when you add your button it might be called CommandButton1

Quote:
Sub CommandButton1_Click()
Call sendForApproval1
End Sub
__________________
Trevor
I am on a learning curve of life, I know a little but like to share what I have learnt with others.
I am using Microsoft Office 2003 To 2013
Please remember everyone here is a volunteer, so if you have had a reply to your thread be courteous and acknowledge this.
Trevor G is offline   Reply With Quote
Old 05-14-2015, 01:17 PM   #18
znxm0i
Newly Registered User
 
Join Date: May 2015
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
znxm0i is on a distinguished road
Re: Access 2010 Email Macro

Hi Trevor,

Thanks so much for the suggestion. The database macros/functions are all working as they should. The ONLY problem I have now is that I can't get it to run via Task Scheduler when I try to place a switch to activate the macro.

If I don't place a switch after the argument in Task Scheduler to open the database, the first part of my macro will run which outputs the pdf file to my desktop.

If I do place the /x macroname after the argument to open the database the code you provided me with WILL NOT run, instead I get an error message 2001 referencing the sendForApproval1() code.

Do you have any idea how I can get this to work? All I want to do is set this macro up to automatically run my reports each day whether I'm at my desk or not.

Thank you.

znxm0i is offline   Reply With Quote
Old 05-20-2015, 01:54 PM   #19
znxm0i
Newly Registered User
 
Join Date: May 2015
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
znxm0i is on a distinguished road
Re: Access 2010 Email Macro

Hi Trevor,

I just wanted to take a moment to tell you again how thankful I am for all the help you provided me. I finally figured out on my own what was stopping MS-Task Scheduler from running my macros. Thanks to your code and MS-Task Scheduler, my Access macro automatically outputs a pdf report, and then creates and sends an MS-Outlook email daily containing the contents without any user intervention.

I hope others find your code useful. Thanks again!
znxm0i is offline   Reply With Quote
Old 10-01-2017, 06:09 AM   #20
amplitude
Newly Registered User
 
Join Date: Oct 2017
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
amplitude is on a distinguished road
Re: Access 2010 Email Macro

Quote:
Originally Posted by danita.moon View Post
I'm trying to write a program which will go through a database and send an email with a specific message to each email automatically.
Please i also need help with this code. I would like to be able to send the email using Gmail. Thank you.
amplitude is offline   Reply With Quote
Old 10-01-2017, 07:38 AM   #21
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,545
Thanks: 188
Thanked 219 Times in 205 Posts
Gasman will become famous soon enough Gasman will become famous soon enough
Re: Access 2010 Email Macro

A search of the forums shows this as one of the threads https://www.access-programmers.co.uk...nd+using+gmail

and has a link to http://www.rondebruin.nl/win/s1/cdo.htm

HTH


Quote:
Originally Posted by amplitude View Post
Please i also need help with this code. I would like to be able to send the email using Gmail. Thank you.

__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LookupRecord Macro Enable EMail - Access 2010 Web Database (No VBA; Must be done in M gdgonzal Macros 1 06-08-2012 10:59 PM
Email from Access 2010 runtime / Server 2008 without an email client Cloyce Modules & VBA 0 05-15-2012 10:08 AM
Send Email macro/button (MS Access 2010) mac300 Macros 0 12-28-2011 12:27 AM
VBA for MS Access 2010 | Checking for valid email only when an email is entered Avionicx Modules & VBA 17 10-05-2011 12:05 PM
Question ms access 2010 email advice PNGBill General 5 07-17-2011 05:13 PM




All times are GMT -8. The time now is 11:29 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World