Ok, so im using this code that I've used in the past only for excel. I think it works but i cant test it cause im at home and outlook message saying server cant be found. So thats a good sign that the code works. What i want is on the form I have a button you click it it then takes the items on the form and creates an email and exits the db. now in front of you have the email which you can further edit before sending.
The part Im having trouble with is getting form items into the email. Example my form contains a subject textbox, an issue description textbox and i have a drop down with clients.
how do i get it so subject = subject in email, issue description = body of email and also client should be in the beginning of body.
heres the code:
The part Im having trouble with is getting form items into the email. Example my form contains a subject textbox, an issue description textbox and i have a drop down with clients.
how do i get it so subject = subject in email, issue description = body of email and also client should be in the beginning of body.
heres the code:
Code:
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = bla
.CC = blabla
.subject = subject
.Body = bodytext
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing