Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2007

Tip: Looking for answers? Try searching our database.

Copy ranges into email - HTLM and Text format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fLiPMoD£ - 06 Nov 2007 23:27 GMT
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
Brian Tillman - 07 Nov 2007 12:39 GMT
> 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.
Signature

Brian Tillman [MVP-Outlook]

Sue Mosher [MVP-Outlook] - 07 Nov 2007 13:59 GMT
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.

Signature

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

> Hi,
>
[quoted text clipped - 27 lines]
>        .Display   'or use .Display or .Send
>    End With

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.