Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / November 2005

Tip: Looking for answers? Try searching our database.

Custom outlook form with button in the inbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 29 Nov 2005 18:07 GMT
I have a custom forms with some extra fields (which includes a button,
lets say 'click me').
Now when the receiver receives it in his inbox, I want the receiver to
click the 'click me' button and some method from VBA should be invoked.

Has anyone tried something similiar before.
Its an urgent requirement.

Any help will be appreciated.
Sue Mosher [MVP-Outlook] - 29 Nov 2005 19:01 GMT
That wouldn't be possible unless you walked around to every machine and added some VBA code.

Why not put the code in the form itself?

Signature

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

>I have a custom forms with some extra fields (which includes a button,
> lets say 'click me').
[quoted text clipped - 5 lines]
>
> Any help will be appreciated.
Chris - 29 Nov 2005 20:03 GMT
Thanks Sue,
How can I add code to the form ? Do you mean the VBA code, and then
pulish it in Organizational Forms library?

Is there any link which I can follow?
Sue Mosher [MVP-Outlook] - 29 Nov 2005 20:22 GMT
Code behind Outlook forms is VBScript. You can get to the code window with the View Code command in design mode. See http://www.outlookcode.com/d/forms.htm 

Signature

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

> Thanks Sue,
> How can I add code to the form ? Do you mean the VBA code, and then
> pulish it in Organizational Forms library?
>
> Is there any link which I can follow?
Chris - 29 Nov 2005 21:08 GMT
I created a new custom form and in its 'edit compose page' added a
button (say, ok) which displays a message 'OK clicked'
And changed the edit read page to display a button 'Click Me' which
displays a msg 'Click me clicked'.
Now when i compose the message and try to click OK, it gives
appropriate message.
But when I receive the message, and I try to click 'Click me' it doesnt
display any message.

The version of outlooks is 2002 sp3.
And OS is XP Professional.

The test code which is:

Sub bOK_click()
    MsgBox "You clicked OK button"
End Sub

Sub bClickMe_click()
    MsgBox "You clicked Click Me button"
End Sub

Any idea whats going wrong? Why click me doesnt display any message??
Sue Mosher [MVP-Outlook] - 29 Nov 2005 22:16 GMT
If the form doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.

To ensure that a form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]

-- For in-house corporate use with Exchange Server, publish the form to the Organization Forms library or a public folder's forms library, as appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal Forms library. Save it as an .oft file and send it to other people who need to use it with instructions to publish it with the same form name that you used.

Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.

[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.

Signature

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

> I created a new custom form and in its 'edit compose page' added a
> button (say, ok) which displays a message 'OK clicked'
[quoted text clipped - 19 lines]
>
> Any idea whats going wrong? Why click me doesnt display any message??
Chris - 30 Nov 2005 00:27 GMT
Thanks Sue,

Tried the [1], still not working..

Is it possible to get a button in the receiving message (ie in the
inbox), and clicking on it, will invoke some function??
Sue Mosher [MVP-Outlook] - 30 Nov 2005 13:40 GMT
Yes, if the form is published to Organizational Forms, Personal Forms, or the recipient's Inbox and is not a one-off.

Signature

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

> Thanks Sue,
>
> Tried the [1], still not working..
>
> Is it possible to get a button in the receiving message (ie in the
> inbox), and clicking on it, will invoke some function??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.