excel - VBA Email Users Only Once -


I work with a program that prepares referral for college students who are struggling academically Allows We then reach students and suggest resources that can benefit them. I am using a spreadsheet to track our call results with students and in the outcome of our call they should be able to automate the follow up email to the faculty. I have been using the following code to do that, but every time I run the code it will email all the faculty on the list.

To attach to the bottom of this, when there is a code to identify an email sent at the end of each line? If so, can email only be sent to Excel / Outlook which have not been emailed? Does it have any meaning?

  Personal Promotional Function ShellExecute Lib "shell32.dll" _ aka "ShellExecuteA" (ByVal hwnd long, byVal lpOperation string, _ ByVal string as lpFile, ByVal lpParameters string As long as the string, as byVal lpDirectory, _ ByVal to nShowCmd), as long as the sub-SendEMail () slow email string, the subj string is the message string string, the string dim R integer as the URL As for as, rows 2-in for r X 'data = 2 to 4 4' as the force receive email address Email = Room (R, 9) "Message Subj =" Connect Success Referral Updates "'Message Message Type Message Message = Message & amp; ; "Hello" message = Message & amp; "Student Success Center Peer callers attempted to reach:" Message = Messages & cells (R., 1). Text & amp; "." & Amp; VbCrLf & VbCrLf Message = Message & amp; "The following interaction happened:" Message = message & cells (R. 7). " "& Amp; VbCrLf & amp; VbCrLf message = Message & amp; "Mike Dill" & amp; VbCrLf message = message & amp; "Coordinator of initial intervention" & amp; VbCrLf message = message & amp; Change the spaces (Subj, "", "20%") Message = Application.WorksheetFunction.Substitute (message, "", "% 20" ) 'Change the carriage return with the% 0d% 0A (hex) message = Application.WorksheetFunction.Substitute (message, vbCrLf, "% 0 d% 0A")' URL URL = 'mailto: "& amp; Email & amp; "? Topic =" & amp; Subj & amp; "& Amp; body =" & amp; Execute the message 'URL (start email client) ShellExecute 0 and, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus' wait two seconds before sending keystroke application. Wait (Now + Time Value ("0:00:02")) Application SendKeys "% s" Next R & sub  

A new" e-mail "column, after the email address, is called column 10 (j).

When the email is sent, the value of the cell is set to something, then check the round next time.

R = 2 to 4 rows 2-4 in the data if cells (R, 10) .Value = "" then go to the email address email = cells (R, 9) .. the rest of the code .. cells (R, 10). Value = "Sent:" & amp; Now finally if the next r

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -