Remove Custom Form?

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

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
 
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.
 
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.
 
Back
Top