This is my first post up here, although I have regularly used this forum to troubleshoot issues in the past.
I have an issue with control identification.
The AUT is MSOutlook2007, on top of which we're developing an Add-In. This extention includes several vanilla .NET2.0 WinForms windows.
The Top level Form is identified as a DotNetForm, and I can attach to this as expected. It displays a std Classname, however and not the DotNETClassname I'd expect.
All the child controls however are identified as GUIObjects (when they're really DotNETCheckBox or DotNETEditBox etc)
To troubleshoot, my developer has created a simple form with the exact same dev tool to double check. This exists completely outside of Outlook and all of these controls are correctly identified as DotNet types.
Has anyone else had any experience of this kind of behaviour?
I've found a couple of similar issues back with TP5.3/4 but nothing that matches exactly. ...ie this Post
I wonder if the fact that the form is spawned from the same thread as Outlook might explain these issues?
I have read about 3rd Party .NET controls and the .Object method, nothing here seems to assist me.
Obviously it is a little frustrating to be unable to work with checkbox state or any other non GUIObject properties for the controls in question.
Your assumption is likely correct. For whatever the reason, TestPartner cannot enumerate through the controls which is neccessary in order to recognize them correctly. I don't have MSO2007 but I am currently working with 2003.
If I look at the Object Browser in VBA for Outlook, I do see two classes that you may be able to work with through the Outlook COM interface(type library reference). The classes are COMAddIn and COMAddins. Hopefully that will at least get you pointed in the right direction.
In briefly looking at the library, I think that the hardest part will be getting the addin object itself. If you can do that, then the rest should be fairly simple.
The one unknown factor, at least to me is does Office wrap .NET addins with COM? Try looking in the VBA ObjectBrowser to see if they have implemented any new interfaces for .NET addins in 2007 as well.