Write code for a button on New Form

Status
Not open for further replies.
B

Brad

Thanks for taking the time to read my question.

I am making a new form, and I have an "Accept" and "Decline" button. Right

now if you click on them nothing happens, as I have no code for them. How do

I assign code to the buttons? Normally if you right mouse click on a control

in design view you can add/assign code to an object. I'd like both buttons to

send the reply, with either "Accepted" or "Declined" in the message body

automatically without the replier having to type anything, just click either

button.

Thanks,

Brad
 
S

Sue Mosher [MVP]

If these are command buttons on the form's design surface, you write code

for their Click event in Outlook's VBScript editor, which you open with the

View Code command. See http://www.outlookcode.com/article.aspx?ID=38 for an

example.

If they are buttons associated with actions on the (Actions) page, the code

needs to go in the Item_CustomAction event hander.

Sue Mosher

"Brad" <Brad> wrote in message

news:131556F4-2A8C-49C6-B150-7597314E0635@microsoft.com...
> Thanks for taking the time to read my question.

> I am making a new form, and I have an "Accept" and "Decline" button. Right
> now if you click on them nothing happens, as I have no code for them. How
> do
> I assign code to the buttons? Normally if you right mouse click on a
> control
> in design view you can add/assign code to an object. I'd like both buttons
> to
> send the reply, with either "Accepted" or "Declined" in the message body
> automatically without the replier having to type anything, just click
> either
> button.

> Thanks,

> Brad
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
F VBA code to dock Styles whenever I write or edit an email Outlook VBA and Custom Forms 0
A Read and Write to Text File Outlook VBA and Custom Forms 1
F VBA routine to write new sub routine in outlook Outlook VBA and Custom Forms 0
P Is it possible to write a macro to email to all addresses of selected contacts? Using Outlook 1
D How Would I Write This Filter? Using Outlook 3
F Can I write a macro that triggers off an Outlook alert Outlook VBA and Custom Forms 1
M how do I write a plug in to send messages to a web app? Outlook VBA and Custom Forms 1
E RE: How do i write a letter to a business contact BCM (Business Contact Manager) 1
P Possible to write a macro to print all attachments with specific . Outlook VBA and Custom Forms 1
P Write a tool to generate a PST file with the same structure as old Outlook VBA and Custom Forms 1
S write and format a piece of text in the body using vba Outlook VBA and Custom Forms 7
J How to write a macro to search inbox for certain numbers Outlook VBA and Custom Forms 2
S Write custom text in outlook infobar Outlook VBA and Custom Forms 1
S Macro to Write Rules Outlook VBA and Custom Forms 4
A How to write into outlook status bar. Outlook VBA and Custom Forms 1
Q Outlook become non responsive if i write outlook item in bulk Outlook VBA and Custom Forms 20
V Outlook 2007: How to read/write Out-of-Office settings Outlook VBA and Custom Forms 3
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 1
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 5
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 1
S Need code to allow defined starting folder and selection from there to drill down Outlook VBA and Custom Forms 10
D VBA code to select a signature from the signatures list Outlook VBA and Custom Forms 3
S HTML Code Embedded in String Within Open Outlook Email Preventing Replace(Application.ActiveInspector.CurrentItem.HTMLBody From Working Outlook VBA and Custom Forms 4
P Color Code or highlight folders in Outlook 2016 Using Outlook 2
N Please advise code received new mail Using Outlook 0
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
S Excel vba code to manage outlook web app Using Outlook 10
S Outlook VBA How to adapt this code for using in a different Mail Inbox Outlook VBA and Custom Forms 0
S Add VBA save code Using Outlook 0
C Auto Run VBA Code on new email Outlook VBA and Custom Forms 1
witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
I Outlook 2003 shows html code when To: field is empty Using Outlook 7
S Skype for business meeting vba code Outlook VBA and Custom Forms 1
R Expand VBA Permanent Delete Code Outlook VBA and Custom Forms 6
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
A VBA Code in Outlook disappears after first use Outlook VBA and Custom Forms 1
Alex Cotton "invalid or unqualified reference" on code that should work Outlook VBA and Custom Forms 5
F VBA to ensure a code is entered in Subject title Outlook VBA and Custom Forms 1
Z Outlook Custom Form: Adding Dropdown(Project Code) at the end of subject Outlook VBA and Custom Forms 0
D Any updates or fixes that would make this code stop working just moving emails to another folder Outlook VBA and Custom Forms 1
N Open & Save VBAProject.Otm using VBA Code Outlook VBA and Custom Forms 1
M error code 0x8DE00006 Using Outlook 1
R VBA Code to permanently delete selected email Outlook VBA and Custom Forms 10
dyny723 Outlook 2016: Code to link a contact to emails received from that contact Outlook VBA and Custom Forms 1
D Command Button code will not execute. Any suggestions Please. Outlook VBA and Custom Forms 2
V VB script code to save a specific email attachment from a given email Outlook VBA and Custom Forms 14
J Custom form code doesn't run Outlook VBA and Custom Forms 2
M code to move selected Outlook contacts to another folder Using Outlook 3
E Outlook Form - Voting Responses Not Auto Processing If Form Contains Any Code Outlook VBA and Custom Forms 0
C Need VBA code to automatically save message outside outlook and add date Outlook VBA and Custom Forms 1

Similar threads

Top