Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    vba coding (2000)

    Hi, in an event click property I have an email that opens and is pre populated with detail taken from fields on the database form, there is a free format section on the e mail. I have a message the currently appears at the head of the e mail "PLEASE INFORM THL IF BUSINESS ACQUIRED", I require this message to sit after the free fromat text iei at the bottom of the email, the message needs to be in red and bold. this is my current code, how can I modify to get desired result?

    If MsgBox("Is this a genuine First Contact IFA lead?", vbYesNo + vbQuestion) = vbYes Then
    ' to populate e mail
    DoCmd.SendObject To:="", Subject:="IFA Lead Information From the Technical Helpline", _
    MessageText:=vbCrLf & vbCrLf & "PLEASE INFORM THL IF BUSINESS ACQUIRED" & vbCrLf & vbCrLf & vbCrLf & "IFA Office:" & " " & Me![IFACustomer] _
    & vbCrLf & vbCrLf & "Contact Detail:" & " " & Me!txtIFAName & " " & txtIFASurname _
    & vbCrLf & vbCrLf & "Client:" & " " & Me![pholder] _
    & vbCrLf & vbCrLf & "Quote/Business Details:" _
    , EditMessage:=True
    ElseIf vbNo Then
    Me.contact = 2
    End If

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: vba coding (2000)

    It is easy to move the line "PLEASE INFORM..." to the end:

    ...
    MessageText:=vbCrLf & vbCrLf & vbCrLf & "IFA Office:" & " " & Me![IFACustomer] _
    & vbCrLf & vbCrLf & "Contact Detail:" & " " & Me!txtIFAName & " " & txtIFASurname _
    & vbCrLf & vbCrLf & "Client:" & " " & Me![pholder] _
    & vbCrLf & vbCrLf & "Quote/Business Details:"
    & vbCrLf & vbCrLf & "PLEASE INFORM THL IF BUSINESS ACQUIRED" _
    ...

    You may have to adjust the number of vbCrLf's. There is no way to make the message red and bold, for SendObject always creates an e-mail in plain text format, regardless of your default e-mail format in Outlook. If you really need to format the message, you would need to use Automation to control Outlook from Access, and set the HTMLBody of the e-mail message. But that is a lot of work.

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: vba coding (2000)

    Cheers Hans, thought it was and tried that previously, clealry I wasn't doing it quite right.

    Thanks again Darren.

Posting Permissions

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