Code for a Command Button

  • Thread starter Thread starter Peter
  • Start date Start date
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
 
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
 
Back
Top