A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Copy ranges into email - HTLM and Text format



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 6th 07, 11:27 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
fLiPMoD£
external usenet poster
 
Posts: 2
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


Ads
  #2  
Old November 7th 07, 12:39 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
Brian Tillman
external usenet poster
 
Posts: 17,452
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  
Old November 7th 07, 01:59 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.outlook.program_vba,microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy ranges into email - HTLM and Text format fLiPMoD£ Outlook - General Queries 2 November 7th 07 01:59 PM
Mail Merge - Format/Send Text and HTML Format srm Outlook - General Queries 0 January 17th 07 06:15 PM
how to copy automatic format from one folder to another Dev Outlook - General Queries 0 January 16th 07 06:19 AM
HTLM bericht weergave Kimmik Outlook Express 4 December 24th 06 03:45 AM
text page format on new email [email protected] Outlook - General Queries 1 July 28th 06 05:13 PM


All times are GMT +1. The time now is 02:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.