Mihyun
IS-IT--Management
- Jan 20, 2009
- 2
Hello,
I believe what I am trying to accomplish is fairly simple. I made a new Custom Action for my Outlook form, and I am trying to execute it using a Command Button (as opposed to having the user find it on the ribbon).
When the Command Button is clicked, a message box appears with the option to choose Yes or No. Upon choosing Yes, I would like the form to execute the custom action I made named "Approve".
I'm finding that the biggest problem I'm having with learning VBScript is not knowing the proper syntax. Here's what the code looks like so far:
Sub ApproveButton_Click()
MsgBox "Are you sure you want to approve this request?", 4
If vbYes = 6 Then
Set MyAction = Application.ActiveInspector.CurrentItem.Actions("Approve") 'This line is probably completely wrong
MyAction.Execute 'Also wrong, most likely
End If
End Sub
Just to clarify, this Custom Action was NOT made using VBScript. It was made in the Actions tab of the form.
Thank you for your time.
I believe what I am trying to accomplish is fairly simple. I made a new Custom Action for my Outlook form, and I am trying to execute it using a Command Button (as opposed to having the user find it on the ribbon).
When the Command Button is clicked, a message box appears with the option to choose Yes or No. Upon choosing Yes, I would like the form to execute the custom action I made named "Approve".
I'm finding that the biggest problem I'm having with learning VBScript is not knowing the proper syntax. Here's what the code looks like so far:
Sub ApproveButton_Click()
MsgBox "Are you sure you want to approve this request?", 4
If vbYes = 6 Then
Set MyAction = Application.ActiveInspector.CurrentItem.Actions("Approve") 'This line is probably completely wrong
MyAction.Execute 'Also wrong, most likely
End If
End Sub
Just to clarify, this Custom Action was NOT made using VBScript. It was made in the Actions tab of the form.
Thank you for your time.