Creating e-mail OR another Excel Document based on cell values

stinkypez

New Member
Joined
Apr 25, 2014
Messages
4
A B C D E F G H I J K
Customer NumberNameRepDate payment ProcessedAmountConfirmInvoiceEmailFax RecipientFax Number
12223Dr. TylerMatt4/25/14500.0044444412235email@email.com
2568463Jim BeanTanya4/25/14300.0056153559868Jenny123-456-7890Fax

<tbody>
</tbody>


Hello,

I work with customers who would like to receive confirmations of their payments either by email or fax. We use outlook in our office, so an e-mail will open up an outlook e-mail when you click on it, and I want the body to have generic text, but allow for the information in that same row to be used. For example:

If I click on "email@email.com" above, I want it to generate an email like this, to email@email.com (everything in bold is taken from the table):

Dear Customer,

A credit card payment in the amount of $500.00 has been applied to invoice 12235. Your confirmation for this payment is 444444.

Thank you for your payment!

Matt


NOTE: I would like to have the capability of adding new customers to this list as well, where adding either an email or fax recipient/number will not have to be-recoded.

Additionally, if the customer prefers a fax confirmation, I would like to be able to click on "fax" button in column K, where it will open up some sort of PDF or Excel template that we can print out and fax to the customer with all of their information and confirmation info.

I have a little programming background but no VBA background, so if anyone is able to write some sort of code, I should be able to understand what the syntax does and I can go from there.

Thanks for your help!

Stinkypez
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Sub Mail_Workbook_1()
' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook 2002, Outlook 2003, Outlook 2007, Outlook 2010.

Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
' Change the mail address or u can use the range for many mail address and loop thru then to send then individualy and subject in the macro before you run it.
With OutMail
.To = "sriram170@gmail.com"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hello World!"

' In place of the following statement, you can use ".send" to
' send the mail.
.display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top