Along the same lines, I am trying to email from Excel, but I only want
to email only from the current row after I right click on cell 13 in
that particular row. Here is just a snippet of what I found that uses
a For Next loop, but I only want the selected row, not all 8200+ rows.
How can this be changed from a For Next loop?? Any help is greatly
appreciated:

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String,
ByVal lpFile As String, ByVal lpParameters As String, ByVal
lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub SendEMail()
    Dim Email As String, Subj As String
    Dim Msg As String, URL As String
    Dim r As Integer, x As Double
        For r = 2 To 8208

Thanks for the group!
Ken


> On Mon, Jan 5, 2009 at 5:42 PM, girishkr...@gmail.com <girishkr...@gmail.com> 
> wrote:
>
> This module can help u out in sending email by outlook,
> I have considered data is been in "sheet1" and email id in Col"A"
> subject in "col C"
> add body of the email as u want in space provided.
> This will send all the emails through your current profile itself,
> whichever would be activated in your outlook application.
>
> Dim oXlWkBk As Excel.Workbook ' Excel Work Book Object
>
> Sub send_mail()
> Dim i As Long
> Dim olApp As Outlook.Application
> Dim olMail As MailItem
>
> Set olApp = New Outlook.Application
> Set olMail = olApp.CreateItem(olMailItem)
>
> Application.ScreenUpdating = False
> Application.DisplayAlerts = False
> Sheets("Sheet1").Activate
>
> For i = 2 To Range("A65535").End(xlUp).Row
>
>    With olMail
>    .To = Cells(i, "A").Value
>    .Subject = Cells(i, "C").Value
>    .body = "Add your body over here"
>    .Send
> End With
> Next i
> MsgBox "All Mails Sent succfully"
>
> Application.ScreenUpdating = True
> Application.DisplayAlerts = True
>
> End Sub
>
> On Jan 5, 10:13 am, "shay shay" <shahinarafi...@gmail.com> wrote:
>
> > Hello All,
>
> >              I have an excel sheet and it contains 800 client names in
> > column A, I want to mail these 800 clients using outlook, is there any way
> > where in I can create a macro which automatically mails these people as soon
> > as I open the excel sheet. its similar to mail merge activity but I am new
> > to it, can some one guide me, its urgent.
> > --
> > Shay
>
> > A Thinker tends to use reason and logic
>
> > A feeler tends to use values and subjective Judgement.
>
> > Be a Thinker in Life.
>
> --
> Shay
>
> A Thinker tends to use reason and logic
>
> A feeler tends to use values and subjective Judgement.
>
> Be a Thinker in Life.
--~--~---------~--~----~------------~-------~--~----~
Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/excel-macros?hl=en

Visit & Join Our Orkut Community at 
http://www.orkut.com/Community.aspx?cmm=22913620

To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com

To see the Daily Excel Tips, Go to:
http://exceldailytip.blogspot.com
 
If you find any spam message in the group, please send an email to Ayush @ 
jainayus...@gmail.com
-~----------~----~----~----~------~----~------~--~---

Reply via email to