Code for a Command Button

P

Peter

I am new to Outlook forms and was looking to create a button in a message
that would save, send, and close the message after the person has filled in
some fields on the page.

I have read some material on doing command buttons, but have been unable to
get it to work right. I am probably missing something simple.

Thanks

Peter
 
S

Sue Mosher [MVP-Outlook]

If the button is named CommandButton1, then the code for it to do what you describe would be simply:

Sub CommandButton1_Click()
Item.Send
End Sub

Item is an intrinsic object representing the item where the code is running.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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