I have attached a sample workbook. The workbook already has a macro that can send an email after working out if the date is overdue. I have put a button on the screen, but I would like to remove the button and automate it, I got the initial macro from,( whoever initially put it together) but I have since made some changes to it regarding how the message displays etc. i, 15 or i, 16 in the macro means, There isn't anything in column i and I can't work out the relevance of it.
I have a spreadsheet showing MOT details of vehicles. The details include 'Customer', Vehicle Reg', 'MOT due date', 'email address'.
Basically.. I want a method that will check whether or not the MOT due date is in 28 days time (so exactly 28 days from now).. and if it is.. then I want to use the email address that is on the same row to send the person a standard notification.. and if possible.. include details of the Vehicle Reg.
I got this VBA code from a colleague which he uses when sending multiple emails from Outlook. This code sends email based from the last cell. What I would like to do is send emails to all the recipients listed in column C. Column A will be the sender and column B will be email subject. Attached is the sample file.
I used Scheduled Task to set up my spreadsheet to open daily. I have the code with assistance to pull out the due date items and place them into an email.
I have come across XLSTART/AUTOEXEC/ACTIVATE...ETC... But cannot figure out the code that will automatically "enabling macro" once Scheduled Task opens the spreadsheet?
Then once the macro runs, the email with the due dates, how can this auto send without user interaction? (currently I would have to hit send)
I am trying to make the process totally automated to open the spreadsheet at a certain time, send the email with due dates and close the spreadsheet.
Following code in ThisWorkbook--
Private Sub Workbook_Open() Check_Date_Send_Mail End Sub Code in Module1--
Option Explicit Sub Check_Date_Send_Mail() Dim wbBook As Workbook Dim wsSheet As Worksheet Dim rnDate As Range, rnValue As Range Dim stAddress As String, stMsg As String Dim stRecipient As String, stSubject As String Dim stPost As String Set wbBook = ThisWorkbook Set wsSheet = wbBook.Worksheets("Sheet1") With wsSheet Set rnDate = .Range("d2:t23") End With
get the code for sending multiple emails as per the spreadsheet list. Assume the spreadsheet has 100 line items and each columns specifies the name of the person, value, recipient email address ("To" and "CC") and sender name.
And the Body of text is :
Hi "Name of the person" Please find the value of "Value" to be paid for the moth of xxx and kindly let me know for further clarification.
1. Attached is an excel spreadsheet. In column A, each time the word total is seen, i want an email to be sent to to someone with the total in colum E.
Eg. A B C D E UAFEQ1 TOTAL xxxx xxxxxxxx xxx R 15 000 ALPROP TOTAL xxxx xxxxxxxxx xxx -R 20 000
For UAFEQ1 TOTAL I would like a mail to be sent to john@example.com For ALRPOP TOTAL I want like a mail to be sent to peter@example.com
If the total in column E is positive i want the mail to say: Please see deposit of R 15 000
If the total in colum E is negative i want the mail to say: Please see withdrawal of -R 20 000
The currency is Rands (South Africa)
Sometimes, i need to send 20 or more e-mails. And these can repeat themselves so, there may be two totals for UAFEQ1 TOTAL and a mail must be sent each time. See attached as an example.
The macro can stop when Grand Total is reached. No email needs to be sent for the grand total.
I am working on a spreadsheet that keeps track of upcoming contract and service renewals. Within the spreadsheet there is a column named "Status"; using a formula based on the renewal and engagement dates this column will automatically state one of the following -
"Contract Status OK" "Up for Renewal" "Renewal Due"
When I open the the file I would like excel to email 2 specific email addresses. The email should only contain data from the rows that state "up for renewal"; this email will act as trigger for my team to engage with the suppliers in question.
I want to run a macro dailly where he is going to look in a specific column and based on that value he needs to send emails based on several other cells.
It is a contract database. So for example in:
column A = Country B = Supplier C = Days untill end D = SPOC E = Manager
What do i want that when i run the macro he looks at column C and where-ever he finds "90" he send automaticly an email to the personnes in column D and E.
In subject i want to see the name of the supplier.
In the email i want to put a text like :
Hello,
Hereby i want to inform you that the contract "Supplier" is going to expire.
Please take the necessary action!,
Also i want to do the same thing when it hits the "30" with other text but i guess that it easy to do when the "90" works
I understand how to email from Excel, but what I need to know is how to automatically delete the emails I just sent from my sent items. I use the code in Excel to email out many reports with attachments every morning, and need to delete them right after I send them to conserve space. Can this be done form within Excel code?
I am trying to send emails using a table in Xl2002 via outlook2002.
The code below is from Walkenbach's VBA Bible for Excel 2003 and I am getting "Uesr-type not defined" error with the 1st Dim statement.
Do I need a different statement such as set OutObj = blahblah or similar?? I have searche dthe net hi & lo for a solution to this problem & I do have JW's excel VBA bible.
Sub SendEmail() 'Uses early binding 'Requires a reference to the Outlook Object Library Dim OutlookApp As Outlook.Application Dim MItem As Outlook.MailItem Dim cell As Range Dim Subj As String Dim EmailAddr As String Dim Recipient As String Dim Bonus As String Dim Msg As String
My task here is to generate email automatically. When i enter x to run the sub findvalue macro.
Any cells on the column D that has the value of 10 should generate email with the message body, subject and email address automatically.
Example if there are 3 task that are 10 days to deadline, 3 email will be generated after entering "x"
I have edited the Sendmail sub to locate the email's body, subject line and email from the excel.
Code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Target = "x" Then If Not Intersect(Target, Target.Worksheet.Range("G2")) Is Nothing Then Call Findvalue End If End If End Sub
Code: Sub Findvalue() Dim Rng1 As Range Dim foundemail As Range Dim a As Variant Set Rng1 = Range("D2:D10") For Each a In Rng1 If a.Value = 10 Then
Set foundemail = Sheets("Email").Range("A:A").Find(What:=Cells(Target.Row, 1), _
I want to have a user-defined function where the user sends a range (i.e. "A1:J1") and each cell is viewed as a member of an array. I can do this if the user sends "A1,B1,C1,D1,E1,F1,G1,H1,I1,J1", but this is very cumbersome. I tried the following code:
Code:
Public Function CreateDenom(DenomValues As Range) As Variant Dim tmpArr() As Variant Dim c As Range For Each c In DenomValues tmpArr(c) = c.Value Next c CreateDenom = UBound(tmpArr) End Function
This won't be the end product of course, but it's a starting point if I can get it to work. However, I get an error stating that "A value used in the formula is of the wrong data type."
I have attached a file that I need to update every hour and send to an email address every hour from 9am to 4pm on certain days of the week. To update this file, I need to hit "update" and "enable links" and it needs to send to a certain email every hour. Is there a way to automate this process?
Code: Sub email() Dim myOutlook As Object Dim myMailItem As Object Dim FName As String Set otlApp = CreateObject("Outlook.Application") Set otlNewMail = otlApp.CreateItem(olMailItem) FName = ActiveWorkbook.Path & "" & ActiveWorkbook.Name
[Code] .....
This code runs fine in order to send an e-mail from outlook while i'm in excel. I would like to change it a bit
The excel has 4 sheets.
The third sheet is named "new items".
In this sheet in COLUMN K i have numbers and empty cells.
What i would like is when in COLUMN K number "7" exists then copy the enire row- and all other rows with "7" to a new excel named "new items" and send an e-mail to specific receipients with "new items" attached.
I will change the code above in order to run this macro by workbook.open()
Plus i'm thinking of adding a message box if no "7"'s exist.
I have created a detention tracking sheet for my school. I need an email to be automatically sent to the teacher when a student does not show up for detention.
Here is what I have currently coded, but the macro is not running, and the email is not being sent. I do not understand why.
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes" ....
I have emails automatically being sent based on what is entered in the attendance columns, but now I need emails being sent on what is entered in the comments columns. Because the target range changes, I do not know how to combine them.
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A11:A50, F11:F50, K11:K50, P11:P50, A55:A94, F55:F94")) Is Nothing Then Exit Sub If LCase(Target) = "no" Then Call RouteActiveWorkbook(Target.Offset(, 1), Target.Offset(, 2), Target.Offset(, 3)) If LCase(Target) = "ex" Then Call RouteActiveWorkbook2(Target.Offset(, 1), Target.Offset(, 2), Target.Offset(, 3)) End Sub
This code results in two macros based on what it entered. Macro 1...........................
Programming Excel VBA Macro to do OCR (text recognition) from a prt scr screen capture image and input the text into cells. Currently my Excel file has a push-button, and upon clicking on it the macro pastes into Excel the current clipboard image I have created by pressing prt scr while in another program. The macro then crops the image to the region with the applicable text. I have to then manually type the text I see in image format into the appropriate cells.
the VBA coding to automate this? I'd like it to use the clipboard image and run it through OneNote OCR, after which the applicable text values are automatically entered into the cells. Ideally the code will first crop to the region with the desired text before it does OCR. If this is not feasible, it will need to incorporate a method (keyword search?) to hone in on the desired text after the entire prt scr image has been OCRed.
I am trying to build a macro using two files. The file 'master data.xls' has student details in a table containing 10 column heads as attributes (roll, name, address, email etc). The file 'Student Profile.xls' has been formatted to show individual student details in the form of a report. I want to prepare a macro such that each time I enter a new record in the "master data.xls", the data from new entry is printed in the format as given in "Student Profile.xls" as a pdf file which is saved with a file name defined by "(roll number) (First Name) (Last Name)" and the same is emailed to the student's email ID as specified in the "master data.xls" with the mail containing an address to the student name (ex: Dear Tom) and a standard text message in the body.
I'm using Excel 2002 on and XP machine. I am creating a spreadsheet to track a work plan.
Column A: Name Column B: Date Column C: Time Column D: YES Column E: No Column F: New Date Column G: New Time
What I'm looking to do is input click able buttons in Columns D: Yes and Column E: No.
When a user clicks on YES, a pop up window should appear with the data in columns A,B,C.
The p0p-up should contain CONFIRM and CANCEL buttons.
Asking the user if they want to confirm the date and Time.
If CONFIRM is clicked Excel should then send an email to me and the user to say that the work schedule has been confirmed.
If CANCEL is clicked the pop-up window closes.
Secondly if the user clicks NO, a pop-up window should open with two free text boxes. One for Proposed date and One for Proposed time. And again 2 buttons for Confirm and Cancel.
If Confirm is clicked then Excel should record the data entered in the free text boxes into Column G and Column H and send emails to me and the user with the Proposed date and Time Data.
I have attached an excel sheet which i wanted to write macro as an attachment. .
when I run a macro an email has to be sent to each persons listed in column A with Voucher # in the subject line and URL in the body of the message after the URL, the body of the message will remain same for all the emails:
so I have typed the body of the message in 2nd sheet:
I am using Excel 2007 and have to send monthly payslips to respective email ids. I have the Name and Email ids in Sheet 2 Range B1:C59 , and employee codes in A1:A59. And in Sheet 1 i have the Payslip format which was automatically displayed when i select the employee code from drop down list in the cell E7 in sheet 1.
Every time i manually save the files as PDF and send to their Emails. I want the out put as whenever i select the employee code from drop down list , it should automatically save as PDF with Name of that employee ( Name of the employee is located in B1:B59 in Sheet 2 ) and attachment should automatically go to that employee's email Id.
I am attempting to create a macro to generate emails based on data in a sheet. The goal is to run the Macro, and have it generate emails to send to contractors letting them know what they are going to be paid. For instance:
Name in Column J Email in Column L Memo in Column N Balance in Column T Due Date in Column P Week Ending Date in Column H
Now what I would like to happen, is to tie a macro into a button that will create the email as follows:
To Field: Email address from Column L Subject: "Company Payment Remittance Payment Date *Date from Column P*" Body: Hello *Name from Column J*, For *WE Date in Column H* you will be paid *Balance from Column T* for the time worked of *Memo in Column N*
Now the tricky part is that I want the email to contain all line items for each email address. So instead of sending one email per line, have the macro automatically put all of the information that needs to be sent to one email address into the message. I don't know if that is possible, but it sure would make my life easier if it was.
I have attached a sample workbook of the data that will be used