How to disable custom forms for outlook 2007

Home » Outlook addins and plugins development » Developer Outlook forms
How to disable custom forms for outlook 2007 [message #299303] Fri, 09 May 2008 08:46 Go to next message
uku  is currently offline uku
Messages: 2
Registered: May 2008
Junior Member
Hi,

I have to use a custom form for my message class "IPM.Note.MyClass"
for outlook clients not supporting vsto and form regions.
For Outlook 2007 I use a VSTO Addin and form regions registerd for
message class "IPM.Note.MyClass" too.
Outlook 2007 has a problem with both registered forms. It seems, the
custom form (MAPI) locks the MailItem object in the VSTO Addin.

Is it possible, to prevent only Outlook 2007 from loading custom
form?

The switch to bypass forms is not an option because of a popup
messagebox with a warning, that custom form can't be loaded.


Thx Uwe
Re: How to disable custom forms for outlook 2007 [message #300043] Mon, 12 May 2008 15:47 Go to previous messageGo to next message
elegaultZZZ  is currently offline elegaultZZZ
Messages: 224
Registered: August 2006
Senior Member
Can you please explain what you mean by "locks the MailItem object in the
VSTO Addin"?

If you want a standard form to display instead of a custom form, you can
probably close an Inspector in the Inspectors.NewInspector event if the
Inspector.CurrentItem.MessageClass doesn't evaluate to your desired message
class.

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
Collaborative Innovations
-> Try Picture Attachments Wizard For Microsoft Outlook <-
Web: http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault


"uku" <kurze-bus@web.de> wrote in message
news:14ad7d7c-d1e4-4c16-b94a-5f063ece7611@r66g2000hsg.googlegroups.com...
> Hi,
>
> I have to use a custom form for my message class "IPM.Note.MyClass"
> for outlook clients not supporting vsto and form regions.
> For Outlook 2007 I use a VSTO Addin and form regions registerd for
> message class "IPM.Note.MyClass" too.
> Outlook 2007 has a problem with both registered forms. It seems, the
> custom form (MAPI) locks the MailItem object in the VSTO Addin.
>
> Is it possible, to prevent only Outlook 2007 from loading custom
> form?
>
> The switch to bypass forms is not an option because of a popup
> messagebox with a warning, that custom form can't be loaded.
>
>
> Thx Uwe



Re: How to disable custom forms for outlook 2007 [message #300161] Tue, 13 May 2008 02:53 Go to previous message
uku  is currently offline uku
Messages: 2
Registered: May 2008
Junior Member
Thank you for your answer.

I guess that the mailitem object is locked, because I get it over

item = _application.ActiveExplorer().Selection[x] as IOutlook.MailItem

and the item is not null, but every item's property is set to null.

This behavior only happens, if I have registered a mapi custom form
against the custom message class of the selected item.
If I prevent outlook from loading the custom form (unregister the Mapi
form in the organization forms library) I can access every property
of the selected item in my VSTO addin.

I can't use the NewInspector event because I don't open the selected
item explicit.
I have a button in the toolbar and after the click event I get the
selected item(s) and try to read some properties, but this fails
because of an exception:

System.Runtime.InteropServices.COMException (0x8002801D): Bibliothek
nicht registriert. (Exception from HRESULT: 0x8002801D
(TYPE_E_LIBNOTREGISTERED))
at Microsoft.Office.Interop.Outlook._MailItem.get_Parent()

I can find the same behavior with the outlook spy addin by Dmitry
Streblechenko:
If I show selected Outlook "Item" object(s) by clicking the button
"Item", I get a property page where all properties are null.

I recapitulate if I have the custom form registered, this form will be
loaded immediate after clicking the "Item" button, no properties will
be available.
If there is no registered custom form everything will be perfect, I
can read every property.

Back to my question, is it possible to prevent outlook from loading a
custom form for the outlook 2007 clients only (the other clients needs
the custom form) ?

Uwe Kurze
Previous Topic:can't get rid of signature file
Goto Forum:
  


 
   
  
 
Top Outlook add-ins
Duplicate Email RemoverDuplicate Email Remover

Delete duplicate emails and posts in Outlook and Microsoft Exchange folders.

Duplicates Remover for OutlookDuplicates Remover for Outlook

Delete duplicates in Microsoft Outlook and Microsoft Exchange Server folders.

Genius Connect - MailGenius Connect - Mail

Store Outlook or Exchange mail in any SQL Database.

PlainSight Desktop CalendarPlainSight Desktop Calendar

Pretty desktop calendar integrates wallpaper, weather forecasts, Outlook.

Total 162 add-ins for Outlook
in 11 categories.

Latest news
  

© 2006-2008 Office Assistance LLC