try this see if it works

Sub send_venddetails()
Dim i As Long
Dim flname As String
Dim objOL As Object
Dim wkb As Workbook


Set objOL = CreateObject("Outlook.Application")

For i = 2 To Sheets("data").Range("a65356").End(xlUp).Row
    With Sheets("Verification")
         'clear exisitng if required
        .Range("a4").Value = ""
        .Range("g4").Value = ""
        .Range("a6").Value = ""
        .Range("g6").Value = ""
        .Range("a8").Value = ""
        .Range("g8").Value = ""
        .Range("a10").Value = ""
        .Range("g10").Value = ""
        .Range("a12").Value = ""
        'add new
        .Range("a4").Value = Sheets("data").Range("b" & i).Value
        .Range("g4").Value = Sheets("data").Range("a" & i).Value
        .Range("a6").Value = Sheets("data").Range("c" & i).Value
        .Range("g6").Value = Sheets("data").Range("d" & i).Value
        .Range("a8").Value = Sheets("data").Range("e" & i).Value
        .Range("g8").Value = Sheets("data").Range("f" & i).Value
        .Range("a10").Value = Sheets("data").Range("g" & i).Value
        .Range("g10").Value = Sheets("data").Range("h" & i).Value
        .Range("a12").Value = Sheets("data").Range("i" & i).Value
    End With

    'send email now
    Sheets("Verification").Copy
    flname = VBA.Environ("temp") & "\" & VBA.Format(VBA.Now,
"dd_mmm_yyyy_hh_mm_ss") & ".xlsx"
    Set wkb = ActiveWorkbook
    wkb.SaveAs flname

    Set olMail = objOL.CreateItem(olMailItem)
      With olMail
        .To = Sheets("Verification").Range("a12")
        .Subject = "Verification"
        .Attachments.Add flname
        .Body = "Please verfiyy----------------------"
        .display
    End With
    wkb.Close

    Kill flname
    Set olMail = Nothing

Next
 Set olApp = Nothing

End Sub




On Fri, Sep 13, 2013 at 11:56 PM, shraddha malvankar <
shraddhamalvan...@gmail.com> wrote:

> Outlook.
>
> Regards,
> Shraddha
>
>
> On Friday, 13 September 2013 22:10:58 UTC+4, ashish wrote:
>
>> Hi
>>
>> R u using lotus notes or outlook for sending emails
>>
>> Regards
>> Ashish
>> Sent on my BlackBerry® from Vodafone
>> ------------------------------
>> *From: * shraddha malvankar <shraddha...@gmail.com>
>> *Sender: * excel-...@googlegroups.com
>> *Date: *Fri, 13 Sep 2013 10:57:37 -0700 (PDT)
>> *To: *<excel-...@googlegroups.com**>
>> *ReplyTo: * excel-...@googlegroups.com
>> *Subject: *$$Excel-Macros$$ Copy Past Macro help
>>
>> Hi,
>>
>>
>>
>> Need help in macro for attached file.
>>
>> I have one excel sheet where as I have around 500 vendors and I need to
>> send mail to each vendor as per their email id but after filling up their
>> respective data in verification sheet.
>>
>> I would like to auto populate the filed from data sheet to Verification
>> sheet.
>>
>> This should happen for each line in data sheet.
>>
>> After which data sheet should get deleted and file should get saved by
>> Vendor Name
>>
>> If possible this file should get sent to each vendor as per their email id
>>
>> Really appreciation your help.
>>
>> Thanks in advance.
>>
>>
>>  --
>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>> https://www.facebook.com/**discussexcel<https://www.facebook.com/discussexcel>
>>
>> FORUM RULES
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> will not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>> members are not responsible for any loss.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "MS EXCEL AND VBA MACROS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to excel-macros...@**googlegroups.com.
>> To post to this group, send email to excel-...@googlegroups.com.
>>
>> Visit this group at 
>> http://groups.google.com/**group/excel-macros<http://groups.google.com/group/excel-macros>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>


-- 
*Regards*
* *
*Ashish Koul*


*Visit*
*My Excel Blog <http://www.excelvbamacros.com/>*
Like Us on 
Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297>
Join Us on Facebook <http://www.facebook.com/groups/163491717053198/>


P Before printing, think about the environment.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to