Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use of Additional Controls on custom forms/VSTO add-in

5 views
Skip to first unread message

nalpakj

unread,
Jan 5, 2007, 5:58:35 PM1/5/07
to
I'm designing a custom form and I really need the ability to display
data in a grid-type control. The data I'm displaying is not coming
from outlook, but from an external database. I've created a custom
region using Outlook 2007.

The problem is that I'm not sure how to get access to these controls
from the VS.Net code. It's easy enough to access the Controls
collection of the user form and cast it to controls in the
Microsoft.Office.Interop.Outlook namespace but I seem to get errors
when I try to cast it to other controls (ie: MSFlexGrid) the cast
fails and the return value is null instead of a reference to the
control.

To be clear, I dropped an MSFlexGrid onto a custom form. I then had
code similar to the snippit below in my add-in:

private AxMSFlexGridLib.AxMSFlexGrid flexGrid;
flexGrid = UserForm.Controls.Item("MSFlexGrid1") as
AxMSFlexGridLib.AxMSFlexGrid;

The value of flexGrid is null after those lines execute.

So..questions:

1. Can I use controls other than those in the Microsoft.Office
namespace?
2. Specifically, what grid controls are available to be used?

0 new messages