Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Remove Custom Form? (http://www.outlookbanter.com/add-ins-outlook/54318-remove-custom-form.html)

Roger[_2_] August 8th 07 08:26 PM

Remove Custom Form?
 
I have a custom form that I published using C# add-in and I would like to
remove that form within the code, either during the add-in shutdown or by
pressing a button. Does anyone have any ideas?
I can also use Redemption.
Thanks




Ken Slovak - [MVP - Outlook] August 8th 07 08:43 PM

Remove Custom Form?
 
Where is the form published?

The Personal Forms Library is really a collection of hidden messages with a
MessageClass of "IPM.Microsoft.FolderDesign.FormsDescription". The hidden
items are located in the hidden Common Views folder. You can get the Folder
EntryID for that folder from the default Store from
Field(PR_COMMON_VIEWS_ENTRYID), where PR_COMMON_VIEWS_ENTRYID = 0x35E60102.

If you get that folder and iterate all items in the hidden items collection
for that MessageClass you will find your form if it was published to
Personal Forms. Your custom form MessageClass is contained in the
PR_MAILBEAT_BOUNCE_SERVER property of the hidden item (0x68000001E), so
that's what you look for to identify your custom form.

--
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


"Roger" wrote in message
...
I have a custom form that I published using C# add-in and I would like to
remove that form within the code, either during the add-in shutdown or by
pressing a button. Does anyone have any ideas?
I can also use Redemption.
Thanks





Roger[_2_] August 9th 07 04:28 PM

Remove Custom Form?
 
Thanks Ken I will give it a try and let you know how it goes.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Where is the form published?

The Personal Forms Library is really a collection of hidden messages with
a MessageClass of "IPM.Microsoft.FolderDesign.FormsDescription". The
hidden items are located in the hidden Common Views folder. You can get
the Folder EntryID for that folder from the default Store from
Field(PR_COMMON_VIEWS_ENTRYID), where PR_COMMON_VIEWS_ENTRYID =
0x35E60102.

If you get that folder and iterate all items in the hidden items
collection for that MessageClass you will find your form if it was
published to Personal Forms. Your custom form MessageClass is contained in
the PR_MAILBEAT_BOUNCE_SERVER property of the hidden item (0x68000001E),
so that's what you look for to identify your custom form.

--
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


"Roger" wrote in message
...
I have a custom form that I published using C# add-in and I would like to
remove that form within the code, either during the add-in shutdown or by
pressing a button. Does anyone have any ideas?
I can also use Redemption.
Thanks







Roger[_2_] August 9th 07 04:42 PM

Remove Custom Form?
 
Thanks again Ken for your help, but I do not see an InfoStore option in C#
COM object.. I looked at Sue's example:
http://www.outlookcode.com/codedetail.aspx?id=572
and I am not able to access the same objects from C# is this true or am I
missing something?

Thanks



"Ken Slovak - [MVP - Outlook]" wrote in message
...
Where is the form published?

The Personal Forms Library is really a collection of hidden messages with
a MessageClass of "IPM.Microsoft.FolderDesign.FormsDescription". The
hidden items are located in the hidden Common Views folder. You can get
the Folder EntryID for that folder from the default Store from
Field(PR_COMMON_VIEWS_ENTRYID), where PR_COMMON_VIEWS_ENTRYID =
0x35E60102.

If you get that folder and iterate all items in the hidden items
collection for that MessageClass you will find your form if it was
published to Personal Forms. Your custom form MessageClass is contained in
the PR_MAILBEAT_BOUNCE_SERVER property of the hidden item (0x68000001E),
so that's what you look for to identify your custom form.

--
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


"Roger" wrote in message
...
I have a custom form that I published using C# add-in and I would like to
remove that form within the code, either during the add-in shutdown or by
pressing a button. Does anyone have any ideas?
I can also use Redemption.
Thanks







Ken Slovak - [MVP - Outlook] August 9th 07 07:08 PM

Remove Custom Form?
 
Sue's example uses CDO 1.21 to get at a store object. You had said you were
willing to use Redemption, which is compatible with C# code. CDO isn't
supported for managed code at all. Use Redemption and get the RDOStore
object that represents your default store from the RDOSession object:

RDOSession.Stores.DefaultStore will return the default store to you as an
RDOStore object. Then use the Fields collection of the RDOStore object to
get the Common Views folder as an RDOFolder object and get its HiddenItems
collection as an RDOItems collection. Iterate that collection, looking for
the desired MessageClass and examine any items (as RDOMail objects) to see
if your custom MessageClass is in the PR_MAILBEAT_BOUNCE_SERVER property.

--
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


"Roger" wrote in message
...
Thanks again Ken for your help, but I do not see an InfoStore option in C#
COM object.. I looked at Sue's example:
http://www.outlookcode.com/codedetail.aspx?id=572
and I am not able to access the same objects from C# is this true or am I
missing something?

Thanks




All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com