A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 5th 07, 11:18 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 2
Default Use of Additional Controls on custom forms/VSTO add-in

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.

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?

  #2  
Old January 5th 07, 11:42 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Use of Additional Controls on custom forms/VSTO add-in

This is on an Outlook legacy custom form? An Outlook 2007 form region? A Windows form?

--
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

wrote in message ps.com...
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.

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?

  #3  
Old January 5th 07, 11:55 PM posted to microsoft.public.outlook.program_forms
nalpakj
external usenet poster
 
Posts: 4
Default Use of Additional Controls on custom forms/VSTO add-in

Sorry, this is Outlook 2007 form region.

Can I use a Windows form in the same manner as a region? I was under
the impression I had to use regions if I want the form to be part of
the main outlook window, and Windows forms only if I'm creating a new
window.


Sue Mosher [MVP-Outlook] wrote:
This is on an Outlook legacy custom form? An Outlook 2007 form region? A Windows form?

--
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

wrote in message ps.com...
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.

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?


  #4  
Old January 6th 07, 12:41 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Use of Additional Controls on custom forms/VSTO add-in

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


The only controls you can use on a custom form region are ActiveX controls. There's no particular known restriction, but also there probably hasn't been a lot of testing of different controls in that environment.

Can I use a Windows form in the same manner as a region? I was under
the impression I had to use regions if I want the form to be part of
the main outlook window, and Windows forms only if I'm creating a new
window.


That's exactly right.
--
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

"nalpakj" wrote in message ps.com...
Sorry, this is Outlook 2007 form region.


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.

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?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to display additional controls dialog box [email protected] Outlook and VBA 2 December 17th 06 05:16 AM
Event handling on Custom Forms with simple controls A Reno Outlook - Using Forms 6 June 19th 06 03:12 PM
Active X Controls in Forms Oliver Gräser Outlook - Using Forms 6 June 11th 06 07:06 PM
How to add dynamically add controls in Outlook 2003 Rahul Outlook and VBA 5 May 8th 06 03:38 PM
How do I use controls in Outlook forms Jeff Strickland Outlook - Using Forms 3 February 28th 06 02:01 AM


All times are GMT +1. The time now is 06:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.