Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: RE: IT'S WORKING!-Sending Email in HTML format


Message #1 by "George Oro" <george@c...> on Thu, 16 May 2002 09:08:02 +0400
This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C1FCB9.2E98CE00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Guys it's WORKING!!!!

Thank you very-very much for your help specially to Prodev and Enzo and
those who give attention and support to this topic.

Q. Is there any restriction or limitation on the HTML code length to be
used/paste as the body?


Just a thought to make this features more powerful and flexible is to bypass
Outlook and use some .dll as mentioned on Enzo's new post Subject: SMTP dll.



Thanks again guys,
George




  -----Original Message-----
  From: Enzo [mailto:enzaux@g...]
  Sent: Wednesday, May 15, 2002 12:40 PM
  To: Access
  Subject: [access] RE: Sending Email in HTML format


  George,

      I can't make it to format in HTML through VBA coding.  But instead if
you just want to have column format on your data, just go to
Tools>Options>Mail Format> Fonts then use Courier (this font has same
character width).  To somehow escape the word wrapping try changing the wrap
width on Tools > Options > Mail Format > Settings then try changing the
number of characters.  To know more about this wrapping go check
http://www.lemis.com/email/fixing-outlook.html

      This works!  This solves my problem, coz I want to send my emails in a
nice column format.  And I hope this for long :)  This is only applicable if
you have also control over the receiver's email client.  For example in my
case I was the one who set up the MS Outlook on the recepients computer. So
I pretty much sure he's getting the same format I have sent.

  Hope this helps,

  Enzo :)
    -----Original Message-----
    From: George Oro [mailto:george@c...]
    Sent: Wednesday, May 15, 2002 1:59 PM
    To: Access
    Subject: [access] RE: Sending Email in HTML format


    Enzo,



    Can you send now an Email in HTML format in Access? Please let me know
cause I need this feature badly also.



    Cheers,

    George





    -----Original Message-----
    From: Enzo [mailto:enzaux@g...]
    Sent: Monday, May 13, 2002 12:28 PM
    To: Access
    Subject: [access] Sending Email in HTML format



    Hi!  Is there a way where I could send an email in html format?  because
I want to create a report in the email body, and the only way I could make
the columns align is by having the font set to Courier.  Below is the code I
used to send email this was posted by John Ruff last year.





    Sub SendMessage(DisplayMsg As Boolean, Optional AttachmentPath)
        Dim objOutlook As Outlook.Application
        Dim objOutlookMsg As Outlook.MailItem
        Dim objOutlookRecip As Outlook.Recipient
        Dim objOutlookAttach As Outlook.Attachment

        ' Create the Outlook session.
        Set objOutlook = CreateObject("Outlook.Application")

        ' Create the message.



        Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

        With objOutlookMsg
             ' Add the To recipient(s) to the message.
             Set objOutlookRecip = .Recipients.Add("Nancy Davolio")
             objOutlookRecip.Type = olTo

             ' Add the CC recipient(s) to the message.
             Set objOutlookRecip = .Recipients.Add("Michael Suyama")
             objOutlookRecip.Type = olCC

            ' Add the BCC recipient(s) to the message.



             Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
             objOutlookRecip.Type = olBCC

            ' Set the Subject, Body, and Importance of the message.
            .Subject = "This is an Automation test with Microsoft Outlook"
            .Body = "This is the body of the message." & vbCrLf & vbCrLf
            .Importance = olImportanceHigh  'High importance

            ' Add attachments to the message.
            If Not IsMissing(AttachmentPath) Then



                Set objOutlookAttach = .Attachments.Add(AttachmentPath)
            End If

            ' Resolve each Recipient's name.
            For Each objOutlookRecip In .Recipients
                objOutlookRecip.Resolve
            Next

            ' Should we display the message before sending?
            If DisplayMsg Then
                .Display
            Else
                .Send
            End If



        End With
        Set objOutlook = Nothing
    End Sub





    Thanks,



    Enzo





  Return to Index