A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Remove Custom Form?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 8th 07, 08:26 PM posted to microsoft.public.outlook.program_addins
Roger[_2_]
external usenet poster
 
Posts: 3
Default 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



  #2  
Old August 8th 07, 08:43 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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




  #3  
Old August 9th 07, 04:28 PM posted to microsoft.public.outlook.program_addins
Roger[_2_]
external usenet poster
 
Posts: 3
Default 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






  #4  
Old August 9th 07, 04:42 PM posted to microsoft.public.outlook.program_addins
Roger[_2_]
external usenet poster
 
Posts: 3
Default 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






  #5  
Old August 9th 07, 07:08 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Item_Send: How to generate a non-custom form message from custom f supportusa Outlook - Using Forms 3 April 9th 07 10:37 PM
Remove attachment button and remove menu "Insert" from compose mail form? [email protected] Outlook - Using Forms 1 September 6th 06 12:58 PM
Custom Form - Receiver replies and form is gone, message body is b Kozlik Outlook - Using Forms 16 July 14th 06 09:32 PM
Emailing a contact vCard with custom form loses all custom info Kim Outlook - Using Contacts 7 April 27th 06 12:21 AM
Cannot programmatically open custom message in custom form ms Outlook - Using Forms 1 January 20th 06 03:01 PM


All times are GMT +1. The time now is 05:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.