Send Object Formatting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thoemmes

    Send Object Formatting

    I am trying to use the following code to create an email message which
    takes its body from values stored in a form. I want to split the values
    up so I have added some line breaks to strBody. These work in acccess
    but as soon as they are transferred to outlook they disapear.

    Is there a way to keep formatting while transferring to outlook?

    TIA

    Private Sub Command159_Clic k()
    Dim strEmailAddress As String
    Dim strTitle As String
    Dim strBody As String

    strTitle = Me.txtTitle.Val ue
    strBody = Me.txtTitle & Chr(13) & Chr(10) & Me.txtAnno.Valu e & Chr(13)
    & Chr(10) & Me.txtDescripti on.Value & _
    Chr(13) & Chr(10) & "£" & Me.txtPrice.Val ue
    strEmailAddress = "rthoemmes@blue yonder.co.uk"

    DoCmd.SendObjec t acSendNoObject, , , strEmailAddress , , , strTitle,
    strBody, -1

    End Sub

  • pietlinden@hotmail.com

    #2
    Re: Send Object Formatting

    If you're using SendObject, AFAIK, you're not using Outlook at all, but
    (probably) only Simple MAPI. If you have to have the stuff formatted,
    then automate *Outlook*, and don't use SendObject. Then you can format
    until you're blue in the face.

    Look at Tony Toews site or at MS for examples. or search the NG for
    Outlook.

    I know they're around, as I've read a lot of them.

    Comment

    Working...