PC Review


Reply
Thread Tools Rate Thread

Adding text to an email

 
 
zak
Guest
Posts: n/a
 
      6th Jan 2009
Hi

I have used the following code to send a row of information in Excel to the
e-mail address stated within the row. But as well as sending the row, I'd
also like to embed some generic text in the email before and after the row is
displayed.

For example, I want "Dear" on one line, "Please see below confirmation of
your appointment" on the 3rd line, then the actual row of information on the
5th line, and then below this, just a line saying "If you need to re-arrange
your appointment, then please contact me."

I have tried to look at other examples and add the code to the below, but
nothing seems to work. Please see me code below and let me know if you can
help. Thank you

Option Explicit

Sub Send_Row()
' Don't forget to copy the function RangetoHTML in the module.
' Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Dim rng As Range
Dim Ash As Worksheet
Dim strbody As String

Set Ash = ActiveSheet
On Error GoTo cleanup
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon

With Application
.EnableEvents = False
.ScreenUpdating = False
End With

For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" Then
Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
With Ash.AutoFilter.Range
On Error Resume Next
Set rng = .SpecialCells(xlCellTypeVisible)
On Error GoTo 0
End With

Set OutMail = OutApp.CreateItem(0)

strbody = "Dear" & vbNewLine & vbNewLine & _
"Please see below confirmation details of your appointment" &
vbNewLine

On Error Resume Next
With OutMail
.To = cell.Value
.Subject = "Confirmation of Appointment"
.HTMLBody = RangetoHTML(rng)
.Display 'Or use Send
End With
On Error GoTo 0

Set OutMail = Nothing
Ash.AutoFilterMode = False
End If
Next cell

cleanup:
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
 
Reply With Quote
 
 
 
 
John Bundy
Guest
Posts: n/a
 
      6th Jan 2009
You should just have to put strBody into the body before the data, something
like
.HTMLBody = strBody & RangetoHTML(rng)

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"zak" wrote:

> Hi
>
> I have used the following code to send a row of information in Excel to the
> e-mail address stated within the row. But as well as sending the row, I'd
> also like to embed some generic text in the email before and after the row is
> displayed.
>
> For example, I want "Dear" on one line, "Please see below confirmation of
> your appointment" on the 3rd line, then the actual row of information on the
> 5th line, and then below this, just a line saying "If you need to re-arrange
> your appointment, then please contact me."
>
> I have tried to look at other examples and add the code to the below, but
> nothing seems to work. Please see me code below and let me know if you can
> help. Thank you
>
> Option Explicit
>
> Sub Send_Row()
> ' Don't forget to copy the function RangetoHTML in the module.
> ' Working in Office 2000-2007
> Dim OutApp As Object
> Dim OutMail As Object
> Dim cell As Range
> Dim rng As Range
> Dim Ash As Worksheet
> Dim strbody As String
>
> Set Ash = ActiveSheet
> On Error GoTo cleanup
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
>
> With Application
> .EnableEvents = False
> .ScreenUpdating = False
> End With
>
> For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> If cell.Value Like "?*@?*.?*" Then
> Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> With Ash.AutoFilter.Range
> On Error Resume Next
> Set rng = .SpecialCells(xlCellTypeVisible)
> On Error GoTo 0
> End With
>
> Set OutMail = OutApp.CreateItem(0)
>
> strbody = "Dear" & vbNewLine & vbNewLine & _
> "Please see below confirmation details of your appointment" &
> vbNewLine
>
> On Error Resume Next
> With OutMail
> .To = cell.Value
> .Subject = "Confirmation of Appointment"
> .HTMLBody = RangetoHTML(rng)
> .Display 'Or use Send
> End With
> On Error GoTo 0
>
> Set OutMail = Nothing
> Ash.AutoFilterMode = False
> End If
> Next cell
>
> cleanup:
> Set OutApp = Nothing
> With Application
> .EnableEvents = True
> .ScreenUpdating = True
> End With
> End Sub

 
Reply With Quote
 
zak
Guest
Posts: n/a
 
      6th Jan 2009
Hi John

I have tried as you have said. It does add the text in, but all on one
line, for example, "Dear" and "Please see below confirmation details of your
appointment" is shown on the same line, but I want them to show on separate
lines. If you look at my code now, you will see i have added vbNewLine to
the end of each sentence, but still no joy. Please let me know if you can
help.

Thanks

Here is my new code:

Option Explicit

Sub Send_Row()
' Don't forget to copy the function RangetoHTML in the module.
' Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Dim rng As Range
Dim Ash As Worksheet
Dim strbody As String

Set Ash = ActiveSheet
On Error GoTo cleanup
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon

With Application
.EnableEvents = False
.ScreenUpdating = False
End With

For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" Then
Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
With Ash.AutoFilter.Range
On Error Resume Next
Set rng = .SpecialCells(xlCellTypeVisible)
On Error GoTo 0
End With

Set OutMail = OutApp.CreateItem(0)

strbody = "Dear" & vbNewLine & vbNewLine & _
"Please see below confirmation details of your appointment" &
vbNewLine

On Error Resume Next
With OutMail
.To = cell.Value
.Subject = "Confirmation of Appointment"
.HTMLBody = strbody & vbNewLine & vbNewLine & _
RangetoHTML(rng)
.Display 'Or use Send
End With
On Error GoTo 0

Set OutMail = Nothing
Ash.AutoFilterMode = False
End If
Next cell

cleanup:
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub





"John Bundy" wrote:

> You should just have to put strBody into the body before the data, something
> like
> .HTMLBody = strBody & RangetoHTML(rng)
>
> --
> -John
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "zak" wrote:
>
> > Hi
> >
> > I have used the following code to send a row of information in Excel to the
> > e-mail address stated within the row. But as well as sending the row, I'd
> > also like to embed some generic text in the email before and after the row is
> > displayed.
> >
> > For example, I want "Dear" on one line, "Please see below confirmation of
> > your appointment" on the 3rd line, then the actual row of information on the
> > 5th line, and then below this, just a line saying "If you need to re-arrange
> > your appointment, then please contact me."
> >
> > I have tried to look at other examples and add the code to the below, but
> > nothing seems to work. Please see me code below and let me know if you can
> > help. Thank you
> >
> > Option Explicit
> >
> > Sub Send_Row()
> > ' Don't forget to copy the function RangetoHTML in the module.
> > ' Working in Office 2000-2007
> > Dim OutApp As Object
> > Dim OutMail As Object
> > Dim cell As Range
> > Dim rng As Range
> > Dim Ash As Worksheet
> > Dim strbody As String
> >
> > Set Ash = ActiveSheet
> > On Error GoTo cleanup
> > Set OutApp = CreateObject("Outlook.Application")
> > OutApp.Session.Logon
> >
> > With Application
> > .EnableEvents = False
> > .ScreenUpdating = False
> > End With
> >
> > For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> > If cell.Value Like "?*@?*.?*" Then
> > Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> > With Ash.AutoFilter.Range
> > On Error Resume Next
> > Set rng = .SpecialCells(xlCellTypeVisible)
> > On Error GoTo 0
> > End With
> >
> > Set OutMail = OutApp.CreateItem(0)
> >
> > strbody = "Dear" & vbNewLine & vbNewLine & _
> > "Please see below confirmation details of your appointment" &
> > vbNewLine
> >
> > On Error Resume Next
> > With OutMail
> > .To = cell.Value
> > .Subject = "Confirmation of Appointment"
> > .HTMLBody = RangetoHTML(rng)
> > .Display 'Or use Send
> > End With
> > On Error GoTo 0
> >
> > Set OutMail = Nothing
> > Ash.AutoFilterMode = False
> > End If
> > Next cell
> >
> > cleanup:
> > Set OutApp = Nothing
> > With Application
> > .EnableEvents = True
> > .ScreenUpdating = True
> > End With
> > End Sub

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      6th Jan 2009
For Html use

StrBody = "This is line 1" & "<br>" & _
"This is line 2" & "<br>" & _
"This is line 3" & "<br><br><br>"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"zak" <(E-Mail Removed)> wrote in message news:8B38E237-C2D4-46C6-9EA4-(E-Mail Removed)...
> Hi John
>
> I have tried as you have said. It does add the text in, but all on one
> line, for example, "Dear" and "Please see below confirmation details of your
> appointment" is shown on the same line, but I want them to show on separate
> lines. If you look at my code now, you will see i have added vbNewLine to
> the end of each sentence, but still no joy. Please let me know if you can
> help.
>
> Thanks
>
> Here is my new code:
>
> Option Explicit
>
> Sub Send_Row()
> ' Don't forget to copy the function RangetoHTML in the module.
> ' Working in Office 2000-2007
> Dim OutApp As Object
> Dim OutMail As Object
> Dim cell As Range
> Dim rng As Range
> Dim Ash As Worksheet
> Dim strbody As String
>
> Set Ash = ActiveSheet
> On Error GoTo cleanup
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
>
> With Application
> .EnableEvents = False
> .ScreenUpdating = False
> End With
>
> For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> If cell.Value Like "?*@?*.?*" Then
> Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> With Ash.AutoFilter.Range
> On Error Resume Next
> Set rng = .SpecialCells(xlCellTypeVisible)
> On Error GoTo 0
> End With
>
> Set OutMail = OutApp.CreateItem(0)
>
> strbody = "Dear" & vbNewLine & vbNewLine & _
> "Please see below confirmation details of your appointment" &
> vbNewLine
>
> On Error Resume Next
> With OutMail
> .To = cell.Value
> .Subject = "Confirmation of Appointment"
> .HTMLBody = strbody & vbNewLine & vbNewLine & _
> RangetoHTML(rng)
> .Display 'Or use Send
> End With
> On Error GoTo 0
>
> Set OutMail = Nothing
> Ash.AutoFilterMode = False
> End If
> Next cell
>
> cleanup:
> Set OutApp = Nothing
> With Application
> .EnableEvents = True
> .ScreenUpdating = True
> End With
> End Sub
>
>
>
>
>
> "John Bundy" wrote:
>
>> You should just have to put strBody into the body before the data, something
>> like
>> .HTMLBody = strBody & RangetoHTML(rng)
>>
>> --
>> -John
>> Please rate when your question is answered to help us and others know what
>> is helpful.
>>
>>
>> "zak" wrote:
>>
>> > Hi
>> >
>> > I have used the following code to send a row of information in Excel to the
>> > e-mail address stated within the row. But as well as sending the row, I'd
>> > also like to embed some generic text in the email before and after the row is
>> > displayed.
>> >
>> > For example, I want "Dear" on one line, "Please see below confirmation of
>> > your appointment" on the 3rd line, then the actual row of information on the
>> > 5th line, and then below this, just a line saying "If you need to re-arrange
>> > your appointment, then please contact me."
>> >
>> > I have tried to look at other examples and add the code to the below, but
>> > nothing seems to work. Please see me code below and let me know if you can
>> > help. Thank you
>> >
>> > Option Explicit
>> >
>> > Sub Send_Row()
>> > ' Don't forget to copy the function RangetoHTML in the module.
>> > ' Working in Office 2000-2007
>> > Dim OutApp As Object
>> > Dim OutMail As Object
>> > Dim cell As Range
>> > Dim rng As Range
>> > Dim Ash As Worksheet
>> > Dim strbody As String
>> >
>> > Set Ash = ActiveSheet
>> > On Error GoTo cleanup
>> > Set OutApp = CreateObject("Outlook.Application")
>> > OutApp.Session.Logon
>> >
>> > With Application
>> > .EnableEvents = False
>> > .ScreenUpdating = False
>> > End With
>> >
>> > For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
>> > If cell.Value Like "?*@?*.?*" Then
>> > Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
>> > With Ash.AutoFilter.Range
>> > On Error Resume Next
>> > Set rng = .SpecialCells(xlCellTypeVisible)
>> > On Error GoTo 0
>> > End With
>> >
>> > Set OutMail = OutApp.CreateItem(0)
>> >
>> > strbody = "Dear" & vbNewLine & vbNewLine & _
>> > "Please see below confirmation details of your appointment" &
>> > vbNewLine
>> >
>> > On Error Resume Next
>> > With OutMail
>> > .To = cell.Value
>> > .Subject = "Confirmation of Appointment"
>> > .HTMLBody = RangetoHTML(rng)
>> > .Display 'Or use Send
>> > End With
>> > On Error GoTo 0
>> >
>> > Set OutMail = Nothing
>> > Ash.AutoFilterMode = False
>> > End If
>> > Next cell
>> >
>> > cleanup:
>> > Set OutApp = Nothing
>> > With Application
>> > .EnableEvents = True
>> > .ScreenUpdating = True
>> > End With
>> > End Sub

 
Reply With Quote
 
John Bundy
Guest
Posts: n/a
 
      6th Jan 2009
That is why Ron is the man! It would have take me a while to remember it
needed to be HTML.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"zak" wrote:

> Hi John
>
> I have tried as you have said. It does add the text in, but all on one
> line, for example, "Dear" and "Please see below confirmation details of your
> appointment" is shown on the same line, but I want them to show on separate
> lines. If you look at my code now, you will see i have added vbNewLine to
> the end of each sentence, but still no joy. Please let me know if you can
> help.
>
> Thanks
>
> Here is my new code:
>
> Option Explicit
>
> Sub Send_Row()
> ' Don't forget to copy the function RangetoHTML in the module.
> ' Working in Office 2000-2007
> Dim OutApp As Object
> Dim OutMail As Object
> Dim cell As Range
> Dim rng As Range
> Dim Ash As Worksheet
> Dim strbody As String
>
> Set Ash = ActiveSheet
> On Error GoTo cleanup
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
>
> With Application
> .EnableEvents = False
> .ScreenUpdating = False
> End With
>
> For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> If cell.Value Like "?*@?*.?*" Then
> Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> With Ash.AutoFilter.Range
> On Error Resume Next
> Set rng = .SpecialCells(xlCellTypeVisible)
> On Error GoTo 0
> End With
>
> Set OutMail = OutApp.CreateItem(0)
>
> strbody = "Dear" & vbNewLine & vbNewLine & _
> "Please see below confirmation details of your appointment" &
> vbNewLine
>
> On Error Resume Next
> With OutMail
> .To = cell.Value
> .Subject = "Confirmation of Appointment"
> .HTMLBody = strbody & vbNewLine & vbNewLine & _
> RangetoHTML(rng)
> .Display 'Or use Send
> End With
> On Error GoTo 0
>
> Set OutMail = Nothing
> Ash.AutoFilterMode = False
> End If
> Next cell
>
> cleanup:
> Set OutApp = Nothing
> With Application
> .EnableEvents = True
> .ScreenUpdating = True
> End With
> End Sub
>
>
>
>
>
> "John Bundy" wrote:
>
> > You should just have to put strBody into the body before the data, something
> > like
> > .HTMLBody = strBody & RangetoHTML(rng)
> >
> > --
> > -John
> > Please rate when your question is answered to help us and others know what
> > is helpful.
> >
> >
> > "zak" wrote:
> >
> > > Hi
> > >
> > > I have used the following code to send a row of information in Excel to the
> > > e-mail address stated within the row. But as well as sending the row, I'd
> > > also like to embed some generic text in the email before and after the row is
> > > displayed.
> > >
> > > For example, I want "Dear" on one line, "Please see below confirmation of
> > > your appointment" on the 3rd line, then the actual row of information on the
> > > 5th line, and then below this, just a line saying "If you need to re-arrange
> > > your appointment, then please contact me."
> > >
> > > I have tried to look at other examples and add the code to the below, but
> > > nothing seems to work. Please see me code below and let me know if you can
> > > help. Thank you
> > >
> > > Option Explicit
> > >
> > > Sub Send_Row()
> > > ' Don't forget to copy the function RangetoHTML in the module.
> > > ' Working in Office 2000-2007
> > > Dim OutApp As Object
> > > Dim OutMail As Object
> > > Dim cell As Range
> > > Dim rng As Range
> > > Dim Ash As Worksheet
> > > Dim strbody As String
> > >
> > > Set Ash = ActiveSheet
> > > On Error GoTo cleanup
> > > Set OutApp = CreateObject("Outlook.Application")
> > > OutApp.Session.Logon
> > >
> > > With Application
> > > .EnableEvents = False
> > > .ScreenUpdating = False
> > > End With
> > >
> > > For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> > > If cell.Value Like "?*@?*.?*" Then
> > > Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> > > With Ash.AutoFilter.Range
> > > On Error Resume Next
> > > Set rng = .SpecialCells(xlCellTypeVisible)
> > > On Error GoTo 0
> > > End With
> > >
> > > Set OutMail = OutApp.CreateItem(0)
> > >
> > > strbody = "Dear" & vbNewLine & vbNewLine & _
> > > "Please see below confirmation details of your appointment" &
> > > vbNewLine
> > >
> > > On Error Resume Next
> > > With OutMail
> > > .To = cell.Value
> > > .Subject = "Confirmation of Appointment"
> > > .HTMLBody = RangetoHTML(rng)
> > > .Display 'Or use Send
> > > End With
> > > On Error GoTo 0
> > >
> > > Set OutMail = Nothing
> > > Ash.AutoFilterMode = False
> > > End If
> > > Next cell
> > >
> > > cleanup:
> > > Set OutApp = Nothing
> > > With Application
> > > .EnableEvents = True
> > > .ScreenUpdating = True
> > > End With
> > > End Sub

 
Reply With Quote
 
zak
Guest
Posts: n/a
 
      7th Jan 2009
This is AMAZING! It now works.

Thank you VERY MUCH !

"John Bundy" wrote:

> That is why Ron is the man! It would have take me a while to remember it
> needed to be HTML.
> --
> -John
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "zak" wrote:
>
> > Hi John
> >
> > I have tried as you have said. It does add the text in, but all on one
> > line, for example, "Dear" and "Please see below confirmation details of your
> > appointment" is shown on the same line, but I want them to show on separate
> > lines. If you look at my code now, you will see i have added vbNewLine to
> > the end of each sentence, but still no joy. Please let me know if you can
> > help.
> >
> > Thanks
> >
> > Here is my new code:
> >
> > Option Explicit
> >
> > Sub Send_Row()
> > ' Don't forget to copy the function RangetoHTML in the module.
> > ' Working in Office 2000-2007
> > Dim OutApp As Object
> > Dim OutMail As Object
> > Dim cell As Range
> > Dim rng As Range
> > Dim Ash As Worksheet
> > Dim strbody As String
> >
> > Set Ash = ActiveSheet
> > On Error GoTo cleanup
> > Set OutApp = CreateObject("Outlook.Application")
> > OutApp.Session.Logon
> >
> > With Application
> > .EnableEvents = False
> > .ScreenUpdating = False
> > End With
> >
> > For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> > If cell.Value Like "?*@?*.?*" Then
> > Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> > With Ash.AutoFilter.Range
> > On Error Resume Next
> > Set rng = .SpecialCells(xlCellTypeVisible)
> > On Error GoTo 0
> > End With
> >
> > Set OutMail = OutApp.CreateItem(0)
> >
> > strbody = "Dear" & vbNewLine & vbNewLine & _
> > "Please see below confirmation details of your appointment" &
> > vbNewLine
> >
> > On Error Resume Next
> > With OutMail
> > .To = cell.Value
> > .Subject = "Confirmation of Appointment"
> > .HTMLBody = strbody & vbNewLine & vbNewLine & _
> > RangetoHTML(rng)
> > .Display 'Or use Send
> > End With
> > On Error GoTo 0
> >
> > Set OutMail = Nothing
> > Ash.AutoFilterMode = False
> > End If
> > Next cell
> >
> > cleanup:
> > Set OutApp = Nothing
> > With Application
> > .EnableEvents = True
> > .ScreenUpdating = True
> > End With
> > End Sub
> >
> >
> >
> >
> >
> > "John Bundy" wrote:
> >
> > > You should just have to put strBody into the body before the data, something
> > > like
> > > .HTMLBody = strBody & RangetoHTML(rng)
> > >
> > > --
> > > -John
> > > Please rate when your question is answered to help us and others know what
> > > is helpful.
> > >
> > >
> > > "zak" wrote:
> > >
> > > > Hi
> > > >
> > > > I have used the following code to send a row of information in Excel to the
> > > > e-mail address stated within the row. But as well as sending the row, I'd
> > > > also like to embed some generic text in the email before and after the row is
> > > > displayed.
> > > >
> > > > For example, I want "Dear" on one line, "Please see below confirmation of
> > > > your appointment" on the 3rd line, then the actual row of information on the
> > > > 5th line, and then below this, just a line saying "If you need to re-arrange
> > > > your appointment, then please contact me."
> > > >
> > > > I have tried to look at other examples and add the code to the below, but
> > > > nothing seems to work. Please see me code below and let me know if you can
> > > > help. Thank you
> > > >
> > > > Option Explicit
> > > >
> > > > Sub Send_Row()
> > > > ' Don't forget to copy the function RangetoHTML in the module.
> > > > ' Working in Office 2000-2007
> > > > Dim OutApp As Object
> > > > Dim OutMail As Object
> > > > Dim cell As Range
> > > > Dim rng As Range
> > > > Dim Ash As Worksheet
> > > > Dim strbody As String
> > > >
> > > > Set Ash = ActiveSheet
> > > > On Error GoTo cleanup
> > > > Set OutApp = CreateObject("Outlook.Application")
> > > > OutApp.Session.Logon
> > > >
> > > > With Application
> > > > .EnableEvents = False
> > > > .ScreenUpdating = False
> > > > End With
> > > >
> > > > For Each cell In Ash.Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> > > > If cell.Value Like "?*@?*.?*" Then
> > > > Ash.Range("A1:G1000").AutoFilter Field:=2, Criteria1:=cell.Value
> > > > With Ash.AutoFilter.Range
> > > > On Error Resume Next
> > > > Set rng = .SpecialCells(xlCellTypeVisible)
> > > > On Error GoTo 0
> > > > End With
> > > >
> > > > Set OutMail = OutApp.CreateItem(0)
> > > >
> > > > strbody = "Dear" & vbNewLine & vbNewLine & _
> > > > "Please see below confirmation details of your appointment" &
> > > > vbNewLine
> > > >
> > > > On Error Resume Next
> > > > With OutMail
> > > > .To = cell.Value
> > > > .Subject = "Confirmation of Appointment"
> > > > .HTMLBody = RangetoHTML(rng)
> > > > .Display 'Or use Send
> > > > End With
> > > > On Error GoTo 0
> > > >
> > > > Set OutMail = Nothing
> > > > Ash.AutoFilterMode = False
> > > > End If
> > > > Next cell
> > > >
> > > > cleanup:
> > > > Set OutApp = Nothing
> > > > With Application
> > > > .EnableEvents = True
> > > > .ScreenUpdating = True
> > > > End With
> > > > End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding signature erases all text in body of email ! Loperman Microsoft Outlook Discussion 1 25th Feb 2010 09:58 PM
Adding HTML text to the email body for each recipient =?Utf-8?B?VG9tIGF0IEdTRA==?= Microsoft Outlook Program Addins 2 6th Jul 2006 11:25 PM
Adding text to body of email with workbook attached. aph Microsoft Excel Programming 3 5th Dec 2005 03:11 PM
Adding text in an email.... =?Utf-8?B?Y2hvcHBlcnRlY2g=?= Microsoft Outlook Discussion 3 24th Jan 2005 08:33 PM
adding email text to a new task in office 2003. Gman Microsoft Outlook 4 13th Apr 2004 06:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:54 AM.