Results 1 to 8 of 8

Using Exell VBA to launch Outlook Email while separating lines in the body of Outlook.

Threaded View

Tazyote Using Exell VBA to launch... 12-26-2013, 07:01 PM
slx Re: Using Exell VBA to launch... 12-26-2013, 07:09 PM
Tazyote Re: Using Exell VBA to launch... 12-26-2013, 07:58 PM
Tazyote Re: Using Exell VBA to launch... 12-26-2013, 08:03 PM
Leith Ross Re: Using Exell VBA to launch... 12-26-2013, 09:54 PM
Tazyote Re: Using Exell VBA to launch... 12-26-2013, 11:51 PM
Leith Ross Re: Using Exell VBA to launch... 12-27-2013, 02:33 AM
Tazyote Re: Using Exell VBA to launch... 12-27-2013, 01:18 PM
  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Peoria, Arizona
    MS-Off Ver
    Excel 2013
    Posts
    39

    Wink Using Exell VBA to launch Outlook Email while separating lines in the body of Outlook.

    Hi Folks,

    I have a bit of a problem trying to get an Excell Macro to separate lines when launching an email in Outlook. To be more specific, I have created a VBA userform which one can fill out then send to MS Outlook by clicking on a Command Button. I have created it because the email to fax service is confusing to use. I have created several TextBoxes to separate the infomation needed for a proper cover sheet. When the command button is hit, it sends the information filled out in the text boxes to the body of the email. The problem is that it reads as a solid line. For example:

    "To: John Doe From: Tazyote # of Pages: 4 Comments: Here is that report you asked for. Let me know if I can help you out. Thanks"

    I would like to have the macro automatically {Enter} after each line so that the body of the email looks like this:

    To: John Doe
    From: Tazyote
    # of Pages: 4
    Comments: Here is that report you asked for. Let me know if I can help you out. Thanks


    I have been unable to figure out how to do this. Here is the macro I am using so far:
    Private Sub CommandButton2_Click()
    Dim oOLook As Object
    Dim oEMail As Object
    '
    Set oOLook = CreateObject("Outlook.Application")
    oOLook.Session.Logon
    Set oEMail = oOLook.CreateItem(0)
    oEMail.Display
    '
     On Error Resume Next
     With oEMail
     .To = "1" & TextBox1.Value & TextBox2.Value & TextBox3.Value & "@faxingmail.com"
     .CC = ""
     .BCC = ""
     .Body = "To: " & TextBox5.Value & " From: " & TextBox6.Value & " # of Pages: " & TextBox7.Value & " Comments: " & TextBox8.Value
     .Subject = TextBox4.Value
     ' .Send
     End With
     On Error GoTo 0
    End Sub
    Any ideas on how to do this? I have attached a screen shot of the UserForm so everyone can visualize what I am talking about. Thanks
    Attached Images Attached Images
    Last edited by Leith Ross; 12-26-2013 at 09:12 PM. Reason: Added Code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Launch outlook and Email specific range of cells
    By Jvollmer33 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 09-19-2013, 07:09 PM
  2. export outlook 2007 email into excel with subject and body of email
    By akulka58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 02:37 PM
  3. Replies: 2
    Last Post: 08-01-2012, 02:47 PM
  4. Outlook Email Body to Excel
    By Sciortmj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2012, 02:10 PM
  5. Outlook email url in body
    By kevinho in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2005, 07:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1