Email spreadsheets

jaypatel

Active Member
Joined
Nov 25, 2002
Messages
389
Hi all,

I have the following data:

in column a, i have a list of email addresses;
in column b, i have a list of spreadsheets

eg

jpatel@test.co.uk; c:text.xls
mpatel@test.co.uk; c:name.xls


so i would need a script to send the text spreadsheet to the jpatel, and the name spreadsheet to mpatel.

Would also need to incorporate a message "YYYYY", and a subject line "XXXX"

can this be done?

Cheers

Jay
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Maybe somthing like this:

Code:
Dim Rng As Range
Set Rng = .Range("A1:A10")
    
Dim cl As Range
    
    For Each cl In Rng
 
    Set obOutApp = CreateObject("Outlook.Application")
    Set obOutMail = obOutApp.CreateItem(0)
   
    With obOutMail
       
        .To = cl.Value

        .CC = ""
        .BCC = ""
        .Subject = "Report" 
 
        .Body = "Hi Joe Bloggs"  & vbCrLf & " " & vbCrLf & _
        "Please find attached  report" & vbCrLf & _
        & "Kind Regards," & vbCrLf & "jaypatel"
        
        .Attachments.Add (cl.Offset(0, 1).Value)

        SendKeys "%{s}", True
        .Send
        'Sends
    End With
    
    Next cl
 
Upvote 0
hi

say if i had a column c, where column c is the subject.

so, in c1, person x receiving admin payroll, the subject line would be November admin payroll; in c2, person y receiving marketing payroll, subject line would be November markting payroll.

the subject line in script above is the same, and need ability to make it different.

Cheers

Jay
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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