Hi there,
This was working and suddenly it is only opening the email and not sending automatically so SendKeys has stopped functioning.
Is there anything else I can do. (PS complete newbie - please speak in lay mans terms as best as you can, I really am just trying my best to get things working)
Private Sub cmd_Submit_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
txt_PName.SetFocus
strbody = "<BODY style = font=size:11pt; font-family:Courier New>" & _
"Hi,<br/><br/>" & _
"ID: <b>" & PID.Value & "</b><br/><br/>" & _
With OutMail
.SentOnBehalfOfName = " "
.To = ""
.CC = RE_Name.Value
.BCC = ""
.Subject = "Submission Form - " & txt_PName.Value
.HTMLBody = strbody
.Display
SendKeys "%{S}"
End With
This was working and suddenly it is only opening the email and not sending automatically so SendKeys has stopped functioning.
Is there anything else I can do. (PS complete newbie - please speak in lay mans terms as best as you can, I really am just trying my best to get things working)
Private Sub cmd_Submit_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
txt_PName.SetFocus
strbody = "<BODY style = font=size:11pt; font-family:Courier New>" & _
"Hi,<br/><br/>" & _
"ID: <b>" & PID.Value & "</b><br/><br/>" & _
With OutMail
.SentOnBehalfOfName = " "
.To = ""
.CC = RE_Name.Value
.BCC = ""
.Subject = "Submission Form - " & txt_PName.Value
.HTMLBody = strbody
.Display
SendKeys "%{S}"
End With