Results 1 to 3 of 3

Thread: html email

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    56
    i'd like to use html in order to format my email, and i think that <b>something bold</b> doesn't work ......

    Is there a way ?

  2. #2
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Talking

    Try this:

    Code:
    Private Sub Command1_Click()
        Dim oOutlookApp As Outlook.Application
        Dim oMailItem As Outlook.MailItem
        Dim strHTML As String
        strHTML = "This is an E-mail Test" & _
        "<br><br>" & _
        "<b>PLEASE NOTE:</b> This is only a test" & _
        "<br><br>" & _
        "Visit my website at : <a href='http://alphaprime.mine.nu'>http://alphaprime.mine.nu</a>" & _
        "<br><br>Thank You!!"
        Set oOutlookApp = New Outlook.Application
        Set oMailItem = oOutlookApp.CreateItem(olMailItem)
        Call oMailItem.Recipients.Add("[email protected]")
        oMailItem.Subject = "Test"
        oMailItem.HTMLBody = strHTML
        'oMailItem.Attachments.Add "c:\add an attachment here..."
        oMailItem.Send
        Set oMailItem = Nothing
        Set oOutlookApp = Nothing
    End Sub
    Also, make sure you set your references to include the Microsoft Outlook 98 Object Model...

    In your HTML, where you would normally use quotes (") use ticks (') or it won't work...

    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    56
    thank you morgan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width