Results 1 to 2 of 2
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Another Outlook question


    You'll have to forgive me...Still new to sending e-mails via Outlook. As you'll see in my code I am trying to display each variable on a new line. However, it is just running together. Suggestions/Tips?

    Code:
    strHeader = "<html><head></head><body>"
        strBody1 = "Store #:" & vStore
        strBody2 = "# Medium Bags: " & vNumMed
        strBody3 = "# Large Bags: " & vNumLrg
        strBody4 = "# Paper Bags: " & vNumPaper
        strBody5 = "Allocate: " & vAllocate
        strBody6 = "Pull & Post Bill: " & vPullPostBill
        strBody7 = "Comments: " & vComments
        strFooter = "</body></html>"
        
        Set OutMail = objOutlook.CreateItem(0)
    
        OutMail.To = vEmailAddr
        OutMail.Subject = "Bag Order Request"
        OutMail.HTMLBody = strHeader & strBody1 & vbCrLf & strBody2 & vbCrLf & strBody3 & vbCrLf & strBody4 & vbCrLf & _
            strBody5 & vbCrLf & strBody6 & vbCrLf & strBody7 & vbCrLf & strFooter
        OutMail.Send  'Send | Display
        Set OutMail = Nothing

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Solved...

    Code:
        strHeader = "<html><head></head><body>"
        strBody = "Store #:" & vStore & "<br />" & "# Medium Bags: " & vNumMed & "<br />" & "# Large Bags: " & vNumLrg & "<br />" & _
                    "# Paper Bags: " & vNumPaper & "<br />" & "Allocate: " & vAllocate & "<br />" & "Pull & Post Bill: " & vPullPostBill & _
                    "<br />" & "Comments: " & vComments
        strFooter = "</body></html>"
        
        Set OutMail = objOutlook.CreateItem(0)
    
        OutMail.To = vEmailAddr
        OutMail.Subject = "Bag Order Request"
        OutMail.HTMLBody = strHeader & strBody & strFooter
        OutMail.Send  'Send | Display

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

Similar Threads

  1. Outlook Object Model question - automation
    By yeah in forum Programming
    Replies: 1
    Last Post: 11-23-2010, 02:05 PM
  2. Outlook
    By andysmith652 in forum Access
    Replies: 5
    Last Post: 10-01-2010, 06:31 AM
  3. Outlook to Access
    By Aubreylc in forum Import/Export Data
    Replies: 1
    Last Post: 01-25-2010, 09:37 AM
  4. Outlook
    By noidea in forum Access
    Replies: 0
    Last Post: 08-01-2009, 08:36 AM
  5. Outlook contacts
    By noidea in forum Access
    Replies: 0
    Last Post: 07-31-2009, 07:44 AM

Tags for this Thread

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