Results 1 to 3 of 3
  1. #1
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402

    htmlbody editing

    Not having used htmlbody before and only relying on VbCrLf to add body text to emails can somebody provide a sample of htmlbody usage eg I have this and the layout is ok but need to convert it to html to add the image. I then loose all the line feeds and spacing.



    So the simple question is how do i do a line feed with HTML?

    myItem.Body = "Please find below, details for the incoming consignment." & vbCrLf & _
    "Including any attachments if available" & "." & vbCrLf & vbCrLf & _
    "This report is for Consignment # - " & Me.Consignment_Note_Number & "." & vbCrLf & vbCrLf & _
    "Received On - " & Me.Date_Received & "." & " From " & Me.Courier & "." & vbCrLf & _
    "Description - " & Me.Description_of_Goods & "." & vbCrLf & _
    "Number of Items - " & Me.Number_of_Items & "." & " Total Weight - " & Me.Weight & "." & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _
    "Addressed To - " & Me.addressed_to & "." & vbCrLf & _
    "P/O or Invoice # Reference - " & Me.po_ref & "." & vbCrLf & vbCrLf & _
    "Other Notes - " & Me.comments & "." & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _
    "Thank you." & vbCrLf & _
    "Logistics Department. " & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _
    WORKS OK WITH HTMLBODY "<img src='c:\aaa\logo.bmp'>" & vbCrLf & vbCrLf & _
    "Any views expressed this communication."

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Instead of vbCrLf use <br>

    myItem.Body = "Please find below, details for the incoming consignment.<br>Including any attachments if available.<br>" & _
    "This report is for Consignment # - " & Me.Consignment_Note_Number & ".<br>" & _
    ...

    Review http://www.w3schools.com/tags/default.asp
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    new it was going to be simple! <br>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-19-2013, 10:21 AM
  2. access will not allow editing
    By wthoffman in forum Access
    Replies: 3
    Last Post: 12-18-2010, 02:13 PM
  3. Locked for editing
    By Ted C in forum Security
    Replies: 19
    Last Post: 10-12-2010, 08:32 PM
  4. Indenting Using htmlbody
    By graviz in forum Programming
    Replies: 1
    Last Post: 12-18-2009, 05:56 PM
  5. Form for Editing Only
    By Schwagr in forum Forms
    Replies: 4
    Last Post: 03-24-2006, 05:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums