How to add dynamically add controls in Outlook 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to

1 Dynamically add a control say checkbox in outlook forms (meeting request).
2 on check or uncheck of that checkbox, I want to do some work


Can somebody help how to do it in VB.net and C#. I am currently using vsto
2005.

Thanks
 
In general, adding controls dynamically is a very bad idea, unless you're doing it as part of an application that later publishes the modified form.

What are you really trying to accomplish here?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks Sue,

I just want to add one more checkbox to a meeting request form and on check
of that I want to do some work......

but I would also like to know
1 Why this is bad idea.
2 What is meant by publishing the form later
3 Can we add the control (check box) at design time also, or there is some
other way

Rahul
 
1) Because it one-offs the form; see http://www.outlookcode.com/d/formpub.htm#oneoff

2) The same page explains what publishing a form means

3) Yes, adding a check box to a custom page is preferable in all cases, although custom meeting request forms don't always work as you might want.

You didn't really answer my question, by the way. Please tell us what the business purpose of this form and check box are.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I am just gaining knowledge on Outlook programming, that is why I wanted to
know
1 Is this possible and if yes how to do this
 
Yes, it's possible, but so is pouring a bottle of dirty water over your head. Just because you can doesn't mean you should, and in this case you shouldn't, because cleaning up the potential mess will be difficult at best.

If you insist on wasting your time on this dead-end technique though, you'd work with the desired custom page from the Inspector.ModifiedFormPages collection and then add controls to its Controls collection with the Add method.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top