Hi
I have a phone book that I adapted from the internet which is sorting and working well
I wanted to email straight from this form based on the search . I added " open email " command button and entered code from
http://www.rondebruin.nl/win/winmail/Outlook/tips.htm . As I am brand new I have made an error but cant problem solve as I dont know enough

Could I ask for some assistance here

undergrad detail search 2019 - Copy.xlsm




Sub Mail_small_Text_Outlook()'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Office 2000-2016
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String


    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)


    strbody = "Hi there" & vbNewLine & vbNewLine & _
              "This is line 1" & vbNewLine & _
              "This is line 2" & vbNewLine & _
              "This is line 3" & vbNewLine & _
              "This is line 4"


    On Error Resume Next
    With OutMail
        .To = "txtMobile"
        .CC = ""
        .BCC = ""
        .Subject = "This is the Subject line"
        .Body = strbody
        'You can add a file like this
        '.Attachments.Add ("C:\test.txt")
        .Send   'or use .Display
    End With
    On Error GoTo 0


    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub