Click event behind the send button does not work

J

jundev

I have designed a message form which has a command button which i
supposed to send the form and the info in it as a mail message to
particular user.

my code is:

Sub CommandButton1_Click()
On Error Resume Next
Set myNamespace = Application.GetNamespace("MAPI")
Set m = Application.CreateItem(0)
m.Subject = "whatever"
m.Body = Item.UserProperties("RouteTo").Value & Item.Body
m.To = "(e-mail address removed); " & Item.SenderName
m.Send
Item.Close 0 '''Const olSave = 0
End Sub

Any help would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top