View Single Post
  #4  
Old March 3rd 08, 02:04 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default programmatically Disable addin

That should be OK, but be aware that if the user opens an item with the
message class specified in the registry for your form region that your addin
will become enabled and start from the Startup() event all over again. The
only way to prevent that would be to hack the registry and delete your entry
for the form region.

I'd probably write out the form region information to the registry if the
license check passed and delete it if the license test failed.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
Thanks Ken.I did
1.In Application_startup I checked licence and added
Application.COMAddIns.Item("MyAddIn").Connect=Fals e.
2.For not displaying form regions -
Protected Overrides Function RequestService(ByVal serviceGuid As Guid) As
Object
If serviceGuid =
GetType(Microsoft.Office.Interop.Outlook.FormRegio nStartup).GUID Then
If gblbLicence = False Then Return Nothing
ObjFormRegion = New FormRegionHookupVB(Me.Application)
'FormRegionHookupVB implements formregionstartup interface
Return ObjFormRegion
End If
Return MyBase.RequestService(serviceGuid)
End Function
will it have any problem with form region?
Thanks again


Ads