PC Review


Reply
Thread Tools Rate Thread

Code for a Command Button

 
 
Peter
Guest
Posts: n/a
 
      5th Nov 2005
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


 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      5th Nov 2005
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Peter" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deselect Command Button by Selecting another Command Button gmcnaugh Microsoft Excel Programming 3 2nd Sep 2008 05:59 PM
Command Button Pictures Taken from Command Bar Button Icons acx@centrum.cz Microsoft Access Forms 0 2nd Dec 2007 01:23 PM
VB's Command Button vs Form's Command Button Ronald Dodge Microsoft Excel Programming 3 24th May 2006 02:23 PM
after a ftp put command it just says "200 PORT command successful." and hangs forever. What could be wrong? when i test the ftp server using IE in "passive" mode it works fine. but ftp at command line hangs on "200 PORT comma Daniel Microsoft Windows 2000 1 29th Apr 2006 02:05 AM
Executing C code from a Command Button's code =?Utf-8?B?bmpj?= Microsoft Word Document Management 1 19th Apr 2004 10:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 PM.