Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
external usenet poster
 
Posts: 14
Default Copy ranges into email - HTLM and Text format

Hi,

How do i add more than one item to the body of a outlook mail using vba.

I am using named range to select the items.

i want to add Text, the leave two lines HTMLBody then leave two lines and
add another HTMLBody and leace two lines and add Text

I have a function that does the RangetoHTML after passing myRange to it.

I am getting confused here.

With OutMail
.To = s
.CC = "SH-DI-List"
.BCC = ""
.Subject = n & " - Trades in Pending Queue in SW " & Format(Now,
"dd-Mmm-yyyy") & _
" - waiting on Cxv to release booking"
.body = "Hi" & vbCrLf & vbCrLf & _
wsb.Range("B1") & vbCrLf & vbCrLf & _
wsb.Range("B2") & vbCrLf & vbCrLf & _
wsb.Range("B3") & vbCrLf & vbCrLf
.HTMLBody = .body & vbCrLf & vbCrLf & RangetoHTML(rng2) & vbCrLf &
vbCrLf
.HTMLBody = .HTMLBody & vbCrLf & vbCrLf & RangetoHTML(rng) & vbCrLf
& vbCrLf

.Display 'or use .Display or .Send
End With


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
external usenet poster
 
Posts: 2
Default Copy ranges into email - HTLM and Text format

fLiPMoD£ wrote:

How do i add more than one item to the body of a outlook mail using
vba.


The programmers hang out in microsoft.public.outlook.probram_vba.
--
Brian Tillman [MVP-Outlook]

  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
external usenet poster
 
Posts: 15
Default Copy ranges into email - HTLM and Text format

Remember that when you're working with HTML, you must always use HTML tags, such as <br, to build the content, not plaiin text constants like vbCrLf.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"fLiPMoD£" wrote in message ...
Hi,

How do i add more than one item to the body of a outlook mail using vba.

I am using named range to select the items.

i want to add Text, the leave two lines HTMLBody then leave two lines and
add another HTMLBody and leace two lines and add Text

I have a function that does the RangetoHTML after passing myRange to it.

I am getting confused here.

With OutMail
.To = s
.CC = "SH-DI-List"
.BCC = ""
.Subject = n & " - Trades in Pending Queue in SW " & Format(Now,
"dd-Mmm-yyyy") & _
" - waiting on Cxv to release booking"
.body = "Hi" & vbCrLf & vbCrLf & _
wsb.Range("B1") & vbCrLf & vbCrLf & _
wsb.Range("B2") & vbCrLf & vbCrLf & _
wsb.Range("B3") & vbCrLf & vbCrLf
.HTMLBody = .body & vbCrLf & vbCrLf & RangetoHTML(rng2) & vbCrLf &
vbCrLf
.HTMLBody = .HTMLBody & vbCrLf & vbCrLf & RangetoHTML(rng) & vbCrLf
& vbCrLf

.Display 'or use .Display or .Send
End With


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink to Word / HTLM bookmark in Excel 2007 Zement Excel Discussion (Misc queries) 3 April 4th 23 02:21 PM
how do I copy an entire worksheet to another with text & format? kb Excel Discussion (Misc queries) 15 July 4th 08 09:25 PM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
Email addresses in Excel need to format for mass email Boomer Excel Worksheet Functions 1 June 9th 06 01:46 PM
How do I format email addresses as Text only? Dstess Excel Worksheet Functions 5 January 9th 05 06:44 PM


All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"