Opening items programmatically in an Inspector Window

Add-in Express™ Support Service
That's what is more important than anything else

Opening items programmatically in an Inspector Window
 
Andrew Lockwood


Guest


Is it possible to open an Outlook item programmatically in an Inspector window? I have tried

OutlookItem.Display(False),

and the item is shown in a window, but it does not appear to be a true Inspector window, because my custom panel does not appear.


Andrew
Posted 04 Nov, 2015 21:23:45 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Andrew,

It is a true Inspector window. You can create a new ADXOlFormsCollectionItem showing a different pane in any InspectorLayout e.g. on MailItem objects and check if the new pane shows.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Nov, 2015 02:16:32 Top
Andrew Lockwood


Guest


Andrei

Thanks for the reply, but I do not understand.

If OutlookItem is a TaskItem and I call

OutlookItem.Display(False)

then surely, the item should open in a Task Inspector, just the same as if I open the same task from my task folder. So why does the pane not show when I call Display, but it does show when I open the same item from the folder?
Posted 05 Nov, 2015 18:31:35 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Andrew,

You can create a test Ribbon button and open the item in the Click event of the button. Does inspector show?


Andrei Smolin
Add-in Express Team Leader
Posted 06 Nov, 2015 01:36:58 Top
Andrew Lockwood


Guest


Andrei

It is very odd. If I do as you suggest, it works fine, and my custom panel displays.

But if I get the OutlookItem from its EntryID (Namespace.GetItemFromID) and then call OutlookItem.Display(False), my adxOlForm is not created so I just get a standard Inspector without my custom panel!


Andrew
Posted 09 Nov, 2015 09:02:17 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Andrew,

I believe the difference is the event in which you call that code.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Nov, 2015 09:12:30 Top
Andrew Lockwood


Guest


Andrei

I am really struggling with this. It is not as simple as I said before. Sometimes my TadxOlForm is created from my code as the Inspector is created / opened, and sometimes it is not.

I can open the same item twice, once straight after the other and the panel isn't created / shown the first time, but it is the next.

What triggers the TadxOlForm to be created?


Andrew
Posted 10 Nov, 2015 06:25:31 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Andrew,

We can't replicate this. Could you please send me a project demonstrating the issue? You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Nov, 2015 05:48:51 Top
Andrew Lockwood


Guest


Andrei

I am thinking about this. The problem is that my add-in is interdependent on a custom database, and it won't run without it. So at the moment, I do not know how to send it to you.
Posted 19 Nov, 2015 04:17:39 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Andrew,

I suppose you open items on condition. You could imitate this right in the Click event of a test button.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Nov, 2015 07:42:52 Top