Emailing- How To Automatically Delete The Emails
May 15, 2007
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?
View 9 Replies
ADVERTISEMENT
Jul 9, 2013
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
View 9 Replies
View Related
Feb 3, 2013
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.
View 1 Replies
View Related
Sep 19, 2008
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.
View 9 Replies
View Related
Oct 24, 2013
I have two columns with emails. I would like to delete the emails that have duplicates. I want to delete them from both columns.
View 3 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
Feb 20, 2012
I have a file and that file has two different tabs. The result in first tab comes from tab two. Every time the columns in tab two changes. Is there a way that any time the column in tab changes, the same is effected in tab one. Eg. For one month there are 8 tabs and 9th is for total. for second month there are 9 tabs and 10th is for total can that effect be done in tab one accordingly?
View 6 Replies
View Related
Aug 13, 2007
What I need VBA to do is scan the data in a certain column (in this case column I entitled "Type") and if it picks up a certain letter (either a "C" "D" or "K") in a range starting from row 2 then Delete the whole row and condense them so I am only left with the data that corresponds to letters "E" and "R"...
Does there exist a macro that can accomplish this for me; the alternative doesn't even bare thinking about as the range can be anything up to row 6k
I have tried looking on the Net and have seen example of similiar macros, alas I'm completely new to this and cannot adapt it to my needs.
View 9 Replies
View Related
Jul 7, 2004
I have a spreadsheet where I would like to automatically delete rows with nothing in them. Here is a typed up example:
BEFORE
Column A
row 1 99999
row 2
row 3 99999
row 4
row 5 99999
AFTER
Column A
row 1 99999
row 2 99999
row 3 99999
row 4
row 5
The spreadsheets I am dealing with have 100's of rows so it is difficult to search through the spreadsheet and delete the rows with nothing in them.
View 9 Replies
View Related
May 15, 2007
I can trying to let the user type a word in to cell A1 and then have Excel remove the rows that contain the word. But VBA below just seem to delete all nonblank rows?
sub delete2()
Range("a2:a200").Select
For Each cell In Selection
If cell.Value = A1 Then
cell.ClearContents
End If
Next cell
Range("a2:a200").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
end sub
how I can update this code?
View 9 Replies
View Related
Sep 14, 2009
Our company has designed a Excel Document for quoting purposes. The problem we are having is that certain sheets that are needed to do the quote do not need to be used after the quote is finished and saved. These extra worksheets are taking up a lot of room on our server. In the document I have already disabled the save feature so that the saveas has to be used. Is there code that can delete sheets 3, 5, 6, 7, 8 upon doing a save as?
View 4 Replies
View Related
May 15, 2014
how to automatically delete (or hide) columns in a spreadsheet given a list of columns that I want to retain (or see).
These are the columns I want to retain (or see):
Name
1st Phone Number
2nd Phone
Country
Conditions
Email Address
Enrollment Status
Room not available
Roommate
Mailing address
Payment Record
Payment Status
Gender
Requested room type
Total Payments to Date
What is your meal preference?
The attached has two tabs......columns I want to retain (or see) and the raw data of all the columns.
View 1 Replies
View Related
Jan 14, 2007
I have some code that works almost perfectly. I am trying to automatically delete rows in which no data exists in cells in a certain column.
the problem that I am having is that is seems to go into an infinite loop.
For example, if I delete row 5 and then iterate to the next row, row 5 becomes what used to be row 6 and now my code is on row 6...essentially skipping a row.
Here is an example data set (note that the set is for 20 rows):
1
3
6
15
36
37
here is the
Sub Macro2()
r = 20
Min = 1
Do While r >= Min
If Cells(r, 1) = "" Then
Cells(r, 1).EntireRow.Delete
Else
r = r - 1
End If
Loop
End Sub
View 9 Replies
View Related
Jan 13, 2009
How I solved my problem of sending out information to more than one email recipient using Lotus notes email and Excel 2003 vb code. I created groups in Lotus Notes for those with more than one email address Then I assigned a string to vaRecipient like so:
.SendTo = vaRecipientThe string was either one email address or a lotus notes group name.
View 2 Replies
View Related
Jul 7, 2007
Dim wb As Workbook
Set wb = ActiveWorkbook
wb.SendMail "person@address", _
"This is the Subject line"
and this seems to work fine. Could there be any potential problems with this? All senders and recipients should be using outlook. Also is there a way to send the workbook but lose any macros attached. I'm not sure that all recipients will be able to receive workbooks containing macros.
View 9 Replies
View Related
Jul 17, 2006
I am attaching workbooks which reflect my original work. I have some questions :
1. How can I allow users to view this with everything working fine? (zipping and emailing was suggested, but I am getting some errors)
2. How can I ensure that the viewing format remains same for everyone viewing it?Al colleague of mine, tried and the formatting is wierd for him
View 3 Replies
View Related
Jan 31, 2007
Does any want know how to do the following:
1. In the same Workbook, I have one sheet with email addresses.
2. On Sheet 1, in Cell D3, I have the actual email address I want to send(Used data validation drop-down to get email address)
3. I´ve used many codes and it sends very well, however it does not send the email as a fully functioning workbook.
4. The recipient gets the following message "This book contains links to other sources"
View 9 Replies
View Related
May 16, 2007
I have a spreadsheet that I email daily after I update the information in it.
I was unable to find a "Code" to do so when I wrote it so what I did instead is use the Sendkeys funtion to emulate the keystrokes as if I were doing it manually. This works well with one exception.
I now have 5 email accounts and I do NOT want it to email via the default. I need to SPECIFY wich account to email thru. But I can ot figure out how to do this.
Sub Email()
' EMAIL Macro
ActiveWorkbook.Save
Application.DisplayAlerts = False
Windows("Load List.xls").Activate
Sheets("email").Visible = True
Sheets("email").Select
Range("a1").Select
SendKeys ("%f")
SendKeys ("d")
SendKeys ("m")
Application.DisplayAlerts = True
ThisWorkbook. Saved = True
View 4 Replies
View Related
Dec 20, 2008
I have a spreadsheet that allows room for 35 students per period, but instead of having the teacher manually go in and delete the extra data and hide the rows, I want to create a macro that will do so.
In cell B4 the teacher will enter how many students are in their first period class. (cell C4 for second period, cell D4 for third etc...) I want the entering of the number to automatically hide the superfluous rows and delete the data in the second column for those rows. I don't want the rows to be completely deleted because another year they may have more students and need those rows back.
I have attached one of the workbooks that I need to put this macro into. I have created room for 35 students in a given period. So if they have 23 students entered into B4 (period one) I would need rows 30-41 to be hidden, and I would need the formulas in B30:B41, E30:E41, H30:H31, K30:K31 etc....deleted.
Basically the point of the formulas is the teacher will enter the total points possible on that given assignment in cell B6, E6, H6 etc....and it autofills that score down, so the teacher only enters those that missed points instead of entering in the missed ones and the 100 percent ones.
I would need those formulas to be deleted because if the assignment was out of 10 then cell B30-B41 will give students a 10, and then the class average will be computing those scores,but those students don't exist.
But if I can't get the macro to auto delete the formulas, I will just not have those formulas in there, and the teacher can enter all scores.
View 9 Replies
View Related
Aug 20, 2014
When I attach a 1 page spreadsheet to an email and send it to my boss, the spreadsheet is no longer on one page when he opens it. What causes this and how can I fix it on my end or fix it from his end to keep the same format?
View 2 Replies
View Related
Nov 29, 2012
Add worksheet as an attachment to an outlook email by having a button on the spreadsheet itself. However I have added another worksheet which i would like to add to the same email ie 2 attached worksheets to the same email this being decontamination certificate. I have tried to do this myself by copying and pasting some of the code and changing the paths and name but all I get is one or the other or the wrong name to the worksheet.
View 10 Replies
View Related
Aug 22, 2007
I am trying write one to search a range of cells and attach all files located in those cells to an email. I can get most of the code to work, but am having difficult getting it to search through specific cells.
View 14 Replies
View Related
Mar 30, 2009
I found this link in numerous places on this forum to email just a single worksheet from a workbook using one macro.
HTML Code: ....
View 12 Replies
View Related
Feb 2, 2012
I am trying to set my cod up so I can email my excel sheet to multiple people. I tried using a ";" to separate the email addresses (as shown below) but that doesn't seem to work.
With ActiveWorkbook    .SendMail Recipients:="bubba@gmail.com;bubba2@gmail.com", Subject:=s    .Message = m    .Close SaveChanges:=False    End With
View 6 Replies
View Related
Feb 7, 2013
Refining the below code which repeats itself for 60 agents per worksheet, for 7 worksheets. Is there a way to loop the code so it counts up 68 cell references until the 'blank cell' condition is met?
[code]'## Agent 1
If Sheets("CSR Dashboards").Range("M3").Value = "" Then sResult = MsgBox( _
Prompt:="CSR Dashboards have been sent.", _
Buttons:=vbOKCancel)
If sResult = vbOK Then
[Code] ........
View 9 Replies
View Related
Sep 26, 2007
I am trying to get a macro to automatically email my workbook out to my distribution list. I have it working but I get a popup telling me:
"A program is trying to automatically send an email on your behalf.
Do you want to allow this?"
Is there anyway I can bypass this message? The code I am using is below:
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "mbudgell@hotmail.com"
.CC = ""
.BCC = ""
.Subject = "NAME"
.Attachments.Add ActiveWorkbook.FullName
.HTMLBody = MyHTML & "Hi,
View 9 Replies
View Related
Feb 24, 2007
I have an icon in excel that i would like to attach a macro to and send sheet 2 to a specific email address.
View 4 Replies
View Related
Jul 4, 2013
I am trying to educate myself in the wonders of Excel (2003) and an struggling somewhat.I have a small project loosely based on a shops stock control and have attached a copy of the workbook -
The user normally only has access to columns B, C and E due to the others being locked and the sheet protected.I would like the sheet to be automatically sorted based on column E each time the workbook is opened.I then need to automatically delete a row once an item in column B has been removed (made blank)
View 3 Replies
View Related
Jan 12, 2005
I need to know how to send an email from Outlook using a rather large email address list (500 addresses) that resides in Excel.
Also, I need to know how to hide the individual recipients and send it out under a title name. I want all of the recipients to see the title name only - and not each other.
View 3 Replies
View Related
Jun 25, 2013
I am building a weekly email to my clients giving them some data on their account. When i send through file-> Share as html email, the formatting gets all screwy.
View 2 Replies
View Related