Hi all,
I have seen many threads on line, but could not get a definative solution.
Following code will activate outlook.
I am trying following:
To.... address will be fetched from textbox29
Main body text will be fetched from textbox14
Very challanging.
So far so good this is what I have done.
Please help
Kind regards
:)
I have seen many threads on line, but could not get a definative solution.
Following code will activate outlook.
I am trying following:
To.... address will be fetched from textbox29
Main body text will be fetched from textbox14
Very challanging.
So far so good this is what I have done.
Please help
Kind regards
:)
Code:
Private Sub CommandButton4_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = Sheets("sheet1").UserForm2.TextBox31.Text
.CC = ""
.BCC = ""
.Subject = "Trying hard "
.Body = Worksheets("sheet1").UserForm2.TextBox14.Text
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub