![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |