create an html email in vb ?

Posted on 2004-11-18
Last Modified: 2010-05-02
at the moment my little app is creating a email in plain text, but
i need to be able to add fonts,colors, and mybe some small images into the body of the email.
Very similar to the html question notifications we receive from experts exchange on our questions -

thanks a

Question by:CraigLazar
    LVL 95

    Expert Comment

    by:Lee W, MVP
    Use CDONTS (or possibly CDO, as CDONTS is being phased out).
    LVL 95

    Accepted Solution

    LVL 69

    Expert Comment

    by:Éric Moreau
    I use to send HTML e-mails.
    LVL 28

    Expert Comment

    If you use Outlook you can try something like this:

    Private Sub Command1_Click()
    Dim objOutlook As Object
    Dim objOutlookMsg As Object
    Set objOutlook = CreateObject("Outlook.Application")
    Set objOutlookMsg = objOutlook.CreateItem(0)

    With objOutlookMsg
        .To = ""
        .Cc = ""
        .Subject = "Hello......"
        .Body = "This is the body of message"
        .HTMLBody = "<H1>HTML version of message</H1>"
      '  .Attachments.Add ("c:\myFileToSend.txt")
    End With

    Set objOutlookMsg = Nothing
    Set objOutlook = Nothing
    End Sub
    LVL 4

    Author Comment

    hi guys
    thanks a stack, sorry i have been hectic,
    will get to it now


    LVL 4

    Author Comment

    so sorry been away and so busy,
    i have this week to go thru this stuff, canu please leave the question open for this
    week and i promise to close it up by the ned of the week

    thanks so much
    Sorry to the experts who have helped here

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now