PC Review


Reply
Thread Tools Rate Thread

Copy ranges into email - HTLM and Text format

 
 
fLiPMoD£
Guest
Posts: n/a
 
      6th Nov 2007
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 With Quote
 
 
 
 
Brian Tillman
Guest
Posts: n/a
 
      7th Nov 2007
fLiPMoD£ <(E-Mail Removed)> 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]

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      7th Nov 2007
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£" <(E-Mail Removed)> wrote in message news:OvtQ%(E-Mail Removed)...
> 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 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
Copy ranges into email - HTLM and Text format fLiPMoD£ Microsoft Outlook 2 7th Nov 2007 01:59 PM
Copy ranges into email - HTLM and Text format fLiPMoD£ Microsoft Excel Discussion 2 7th Nov 2007 01:59 PM
Copy ranges into email - HTLM and Text format fLiPMoD£ Microsoft Excel Misc 2 7th Nov 2007 01:59 PM
Copy ranges into email - HTLM and Text format fLiPMoD£ Microsoft Outlook VBA Programming 2 7th Nov 2007 01:59 PM
Winmail.dat being sent even though HTLM format is set =?Utf-8?B?UGF1bA==?= Microsoft Outlook Discussion 0 27th Jan 2007 09:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 AM.