VBA To Automatically Fill In Template Then Email
Jul 25, 2013
I have a list of people on sheet 1, column A. The corresponding information for each person is listed across 5 columns in sheet B (cols A:E). **The row numbers are consistent throughout the sheets (ie. Joe is listed in Row 5 on sheet 1, and his name and info is listed in Row 5 cols A:E on sheet 2).
Name
June Sales
Sales Quota
YTD Sales
Total June Payout
Joe
$5000
$3000
$20,000
$4,000
Susan
$4500
$3500
$21,000
$4,000
What I want to do is to customize this weekly report for each person: Joe gets only HIS information emailed to him in a "template" that would be standard for each person (see below) -- the template would be the words in blue with the corresponding info, and this would be put directly into the BODY of the email
Name
June Sales
Sales Quota
YTD Sales
Total June Payout
Joe
$5000
$3000
$20,000
$4,000
This would be repeated for all people on the list (100+). I think I can figure out some email code, but it is getting the information into the SAME template for each person repeatedly (not sure how to write a loop for this including the template)
View 2 Replies
ADVERTISEMENT
Sep 16, 2013
I am using Excel 2010. I have been given a task at work that can save my team a lot of time if I can solve the problem. Every month, we have a spreadsheet with about 5000 rows that we have to email. In each row, there is a range that we have to email to a specific email. For example, I would have to copy and paste Range A2-R2 in the body of the email, and then email it to whatever email is in cell S2. I would then continue this for the next 5000 lines, making it a possibility that i will be sending 5000 emails manually.
I have been trying to come up with a solution through VBA that would automatically send these emails. My goal is to automatically send the Range A2-R2 to outlook email, then cell S2 into the "To" email address box, and then automatically send it. So far, i have successfully been able to send one row, but cannot figure out how to loop it for the remainder of the rows.
A couple other key points are that I have column headings as well (Range A1-R1). If possible, I want to be able to include the column headings in the email body as well. Example - first email would be range A1-R2. second email would be range A1-R1 and A3-R3, and so forth. The body of the email would also contain a standard script, such as "Please review the information below."
The goal here is to save everyone from having to send 5000+ manual emails. This would be a big boost for my team.
Code:
Sub Email()
Dim rng As Range
Dim OutApp As Object
[Code].....
View 5 Replies
View Related
Mar 2, 2009
I currently have a button then when pressed automatically sends a summary report taken from the first page of Sheet 1.
Worksheet needs to be protected all the time, but Macro only works on an unprotected worksheet.
I was wondering what additional code and where to put in so that when
protected back again after Macro has been executed?
Here’s the Macro taken from [url]
View 11 Replies
View Related
Jun 27, 2014
I can find code that allows me to open a word document and insert the value of a TextBox into the bookmark.
I have a bookmark in a OFT file (Outlook Template) and can't seem to make the same thing happen.
My question: Can you insert the value of a TextBox into the bookmark in the body of an email?
View 2 Replies
View Related
Apr 4, 2014
I have a word document that is a rental agreement. Im trying to make an easy to use user form where a person can input the information and it populates in the correct areas and saves as a pdf. How I could put the word document into excel and have a userform populate designated areas.
View 1 Replies
View Related
Jan 7, 2010
how do i go about saving an Excel sheet (template) automatically, using data stored in the A1 cell of Sheet1 as the file name. i want to use an Excel template to capture data, and then store the data in a central location. to do this i am thinking of getting the template to automatically save to a set location e.g. C/: files. is there a simple way to do this.
View 2 Replies
View Related
Jun 4, 2008
Is it possible to open a template, prompt the user to enter data and have the template save itself as the user defined data?
View 5 Replies
View Related
Apr 17, 2014
I currently have a large spreadsheet that multiple people fill out. Each person fills out all the information in a row. At the end of the row, I would like a button that says "Generate Form" so that when clicked, a new sheet automatically opens with a template form that I created and is already filled out with the information that was just inputted into the spreadsheet. Also, there are four different template forms that could generate. For example, there are forms A, B, C and D. If the user inputs "B" into the first column of the row, then when he goes to click "Generate Form", a new sheet is created with all the information filled out in Form B.
View 3 Replies
View Related
Jul 29, 2014
Currently, I have a report that's emailed to me once a day, from which I copy and paste data into my spreadsheet, then send out a once a day report. I would like to have that report updated 10 or 12 times a day, but that would start to eat up a LOT of my time. The email is always in the same format, and I'm wondering if there is a way to use something like a web query to automatically pull that data and update the sheet?
View 2 Replies
View Related
Nov 30, 2012
I am trying to find a way of sending an email when a something comes out of date.
View 9 Replies
View Related
Aug 22, 2008
way to generate automated email whenever excel file is updated by any one.
View 14 Replies
View Related
Jul 11, 2012
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.
View 4 Replies
View Related
Nov 19, 2008
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" ....
View 9 Replies
View Related
Feb 21, 2013
how to create a copy of my employee attendance template. Is there a way to create a copy of the template by entering an employee name in the "name" cell of the template and it automatically renames the sheet that employee name and also saves or recopies the template for use with the next employee?
View 8 Replies
View Related
Nov 22, 2008
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...........................
View 9 Replies
View Related
Feb 23, 2010
to illustrate I attached a spreadsheet.The spreadsheet contains 5 colunms.
1. Names
2-4. Numbers
5. Sum of numbers (the formula for the sum is only entered in the first row)
What I want to do is automatically fill in sums from the second to the last row. I was trying it with the "record macro" function but failed because I don't know how to jump to the last row. CRTL-Shift-down is not useful in this case.
View 5 Replies
View Related
Mar 5, 2014
I have an Excel file which extracts data from other excel files (the other excel files are named 1.xls, 2.xls, 3.xls, etc.). So the formula in the cell is for example: ='C:[1.xls]Sheet1'!A1
Is there a way to let Excel fill in the next excel file address for the next cell? So that i would get this:
='C:[1.xls]Sheet1'!A1
='C:[2.xls]Sheet1'!A1
='C:[3.xls]Sheet1'!A1
='C:[4.xls]Sheet1'!A1
etc..
Because i have about 500 excel files, and otherwise i have to change the file number manually...
View 2 Replies
View Related
Jan 10, 2009
In the worksheet just say:Cell A1: Jan-11-2009 as today date. Cell A2: What is a date function I need to put in there so when a computer clock change to 12:01am it automatically fill in a next day it should be Jan-12-2009 and continues do so for the next day at A3 ....when computer clock change again. Remember I wanted a cells A2...A3...A2000 are blank until the computer clock change to 12:01am.
View 5 Replies
View Related
Jul 4, 2014
If a certain email comes into a mailbox with certain parameters eg subject and from criteria is met. Then extract the data from the email attachment (daily order) and add it to a master sheet containing all orders.
View 1 Replies
View Related
Jan 24, 2012
what is the proper terminology for the Outlook "Thing" that opens up in excel (shown below)? Is it simply a toolbar? Add-in?
Second question, I have a excel file that automatically loads the outlook "Toolbar" each time it is opened.
The file was made in 2010 and password protected and locked, sent to a worker who edited the appropriate fields and saved, and then they sent the file back to me (2003 Format). Now this file automatically loads the outlook toolbar. I am trying to trouble shoot so what would cause this behavior?
View 4 Replies
View Related
Oct 25, 2012
I am using the following piece of VBA code in Excel 2007 to automatically generate an email when a button is pushed:
Sub SendEMail()
Dim Email As String, Subj As String
Dim Msg As String, URL As String
Dim r As Integer, x As Double
r = ActiveCell.Row
'Get the email address
Email = Cells(r, 3)
[Code] .....
The button to launch this code sits in cell AK7. What I would like to do is have the macro copy the email address present in cell E7 into the email address section of my created email. In addition I would like the reference provided in cell AJ7 to appear in the Message Subject part of the generated email in the format " RCS Reference contents of cell AJ7".
View 3 Replies
View Related
Jun 20, 2014
I need VBA code to automatically send an email notification when data is added to worksheet. I am not very familiar with writing code and have been using other code from other posts. Ideally I would like it to send an email notification with the added information attached, in this case it would be Row # and Columns A thru O.
View 1 Replies
View Related
Aug 26, 2008
I want to create a communication excel sheet. I want it in such a way that if any one of the team member make update and save the file, then the whole team should receive an email that the file has been updated.
View 9 Replies
View Related
Mar 27, 2014
I am trying to get the Price to automatically fill cell C11 of the attached spreadsheet when a user enters Grade and Thickness information. I have tried index function, match function, vlookup function, and combinations of all with no luck.
View 5 Replies
View Related
Jun 22, 2009
I am creating a register of first aid kits on my site. What I want to do is have a summary as the first worksheet, and then have contents, and individual expiry dates for each kit on seperate kits. Is there a way to autofill, or auto complete, a different sheet name in formulas?
Ie.
='Kit 1'!$B$27
='Kit 2'!$B$27
='Kit 3'!$B$27
...
='Kit 44'!$B$27
View 8 Replies
View Related
Aug 4, 2009
I'm using sheet for ledger. For entering date I use =today() but I want to do that in date column(A) I set a formula only once that if I enter data in 2nd column it automatically add today date and if data enter day after tomorrow it will add corresponding date. Is this possible?
View 9 Replies
View Related
Aug 14, 2008
I'm trying to create an invoice with customer list, and the problem now is I'm trying to find a list-dependent data way to input my customer's address.
At the moment, all I can do is a dependent dropdowns from a sorted list (see method here). So it's kinda troublesome in such that my list (of customers) opens up a list for address that has only one option (since there's only one address for each customer).
I hope there's a method out there whereby I can have a list of customers, then select the customer I want, and the address of this particular customer will appear in another cell below automatically (without the need of selecting it in another list).
My address is actually split into three different cells - Address, Building & Postal Code.
View 3 Replies
View Related
Aug 1, 2008
I have created a spreadsheet that I must fill out daily. this worksheet has averages that must be automtically shared with a "master" worksheet.
for example
information from sheet2!b23
information from sheet3!b23
information from sheet4!b23
etc...
must automatically be transfered to
sheet1!c6
sheet1!c7
sheet1!c8
etc...
in that order
at this time I am typing in =sheet2!b23 on sheet1 everytime, I want to avoid this.
If you are asking yourself why? I dont blame you but it needs be this way so I can average each days spreadsheet.
View 5 Replies
View Related
May 9, 2013
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), _
[Code] .......
View 4 Replies
View Related
Jan 10, 2014
I need to write a macro to split an excel file into separate workbooks and automatically email our project managers.
View 1 Replies
View Related