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

problem with publish custom Post form



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 12th 08, 12:54 PM posted to microsoft.public.outlook.program_addins
shubhangi
external usenet poster
 
Posts: 28
Default problem with publish custom Post form

hello
I've Customized IPM.POST form & need to publish it to folder when my
addin(VSTO SE ,OL 2007) starts (in Application_StartUp).When I run publish
code it always prompts for "Select Folder" though I've given the folder
object as an arg. to PublishForm().How to avoid the prompt for "Select
Folder"
I'm using below code

Dim olFormDesc As Outlook.FormDescription
Dim olPostItem As Outlook.PostItem
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")
olFormDesc = olPostItem.FormDescription
olFormDesc.Name = "Case"
olFormDesc.DisplayName = "Case"
olFormDesc.Hidden = False
olFormDesc.PublishForm(Outlook.OlFormRegistry.olFo lderRegistry, ObjFolder)
olPostItem = Nothing
olFormDesc = Nothing

Thanks


Ads
  #2  
Old February 13th 08, 12:50 PM posted to microsoft.public.outlook.program_addins
shubhangi
external usenet poster
 
Posts: 28
Default problem with publish custom Post form

I've one more question-
On my customized POST form(which has separate read,compose layout),I've the
message control.When I post the item ,on receiving & opening it I can't
change the contents of Message control.Is it bcoz the item is posted to
folder?Is it possible to allow the user to change the contents of message
control after posting it & opening it from the folder to which item was
posted?
thanks

"shubhangi" wrote in message
...
hello
I've Customized IPM.POST form & need to publish it to folder when my
addin(VSTO SE ,OL 2007) starts (in Application_StartUp).When I run publish
code it always prompts for "Select Folder" though I've given the folder
object as an arg. to PublishForm().How to avoid the prompt for "Select
Folder"
I'm using below code

Dim olFormDesc As Outlook.FormDescription
Dim olPostItem As Outlook.PostItem
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")
olFormDesc = olPostItem.FormDescription
olFormDesc.Name = "Case"
olFormDesc.DisplayName = "Case"
olFormDesc.Hidden = False
olFormDesc.PublishForm(Outlook.OlFormRegistry.olFo lderRegistry, ObjFolder)
olPostItem = Nothing
olFormDesc = Nothing

Thanks



  #3  
Old February 13th 08, 03:06 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default problem with publish custom Post form

Is objFolder a valid object and not null?

--
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
...
hello
I've Customized IPM.POST form & need to publish it to folder when my
addin(VSTO SE ,OL 2007) starts (in Application_StartUp).When I run publish
code it always prompts for "Select Folder" though I've given the folder
object as an arg. to PublishForm().How to avoid the prompt for "Select
Folder"
I'm using below code

Dim olFormDesc As Outlook.FormDescription
Dim olPostItem As Outlook.PostItem
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")
olFormDesc = olPostItem.FormDescription
olFormDesc.Name = "Case"
olFormDesc.DisplayName = "Case"
olFormDesc.Hidden = False
olFormDesc.PublishForm(Outlook.OlFormRegistry.olFo lderRegistry, ObjFolder)
olPostItem = Nothing
olFormDesc = Nothing

Thanks


  #4  
Old February 13th 08, 03:07 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default problem with publish custom Post form

No post form can be changed once posted unless you use Edit, Revise
Contents. Doesn't that work for your custom post 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


"shubhangi" wrote in message
...
I've one more question-
On my customized POST form(which has separate read,compose layout),I've
the message control.When I post the item ,on receiving & opening it I
can't change the contents of Message control.Is it bcoz the item is posted
to folder?Is it possible to allow the user to change the contents of
message control after posting it & opening it from the folder to which
item was posted?
thanks


  #5  
Old February 14th 08, 01:03 PM posted to microsoft.public.outlook.program_addins
shubhangi
external usenet poster
 
Posts: 28
Default problem with publish custom Post form

Thanks !
1.with "Revise Contents" ,I'm able to change contents of Message ctrl on my
custom form.I need to allow the user to change contents of Message ctrl when
user opens the item.In such case I need to find "Revise Contents" by id &
use execute ,right?
2.I checked if the folder "ObjFolder" is set appropriately.Though
"ObjFolder" is set & it is not null ,still it prompts for select folder.The
folder is "Mail & Post Items" type.
thanks again


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Is objFolder a valid object and not null?

--
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
...
hello
I've Customized IPM.POST form & need to publish it to folder when my
addin(VSTO SE ,OL 2007) starts (in Application_StartUp).When I run
publish code it always prompts for "Select Folder" though I've given the
folder object as an arg. to PublishForm().How to avoid the prompt for
"Select Folder"
I'm using below code

Dim olFormDesc As Outlook.FormDescription
Dim olPostItem As Outlook.PostItem
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")
olFormDesc = olPostItem.FormDescription
olFormDesc.Name = "Case"
olFormDesc.DisplayName = "Case"
olFormDesc.Hidden = False
olFormDesc.PublishForm(Outlook.OlFormRegistry.olFo lderRegistry,
ObjFolder)
olPostItem = Nothing
olFormDesc = Nothing

Thanks




  #6  
Old February 14th 08, 03:28 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default problem with publish custom Post form

1. Correct, get the control and call Execute on it. The ID for that control
as shown by OutlookSpy is 3273.

2. Your code isn't displaying the select folders dialog when you publish
your Post form, it's displaying that dialog when this line is executed:
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")

Supply the optional inFolder argument to the CreateItemFromTemplate() method
and that should get rid of that dialog. Continue to supply the folder
argument to the PublishForm() method line

--
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 !
1.with "Revise Contents" ,I'm able to change contents of Message ctrl on
my custom form.I need to allow the user to change contents of Message ctrl
when user opens the item.In such case I need to find "Revise Contents" by
id & use execute ,right?
2.I checked if the folder "ObjFolder" is set appropriately.Though
"ObjFolder" is set & it is not null ,still it prompts for select
folder.The folder is "Mail & Post Items" type.
thanks again


  #7  
Old February 18th 08, 02:12 PM posted to microsoft.public.outlook.program_addins
shubhangi
external usenet poster
 
Posts: 28
Default problem with publish custom Post form

Thanks Ken
I supplied the folder argument to publishForm() & now it worked

"Ken Slovak - [MVP - Outlook]" wrote in message
...
1. Correct, get the control and call Execute on it. The ID for that
control as shown by OutlookSpy is 3273.

2. Your code isn't displaying the select folders dialog when you publish
your Post form, it's displaying that dialog when this line is executed:
olPostItem = Application.CreateItemFromTemplate(AppPath & "\Case.oft")

Supply the optional inFolder argument to the CreateItemFromTemplate()
method and that should get rid of that dialog. Continue to supply the
folder argument to the PublishForm() method line

--
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 !
1.with "Revise Contents" ,I'm able to change contents of Message ctrl on
my custom form.I need to allow the user to change contents of Message
ctrl when user opens the item.In such case I need to find "Revise
Contents" by id & use execute ,right?
2.I checked if the folder "ObjFolder" is set appropriately.Though
"ObjFolder" is set & it is not null ,still it prompts for select
folder.The folder is "Mail & Post Items" type.
thanks again




 




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
Publish custom form MAPI error jharris Outlook - Using Forms 2 November 22nd 06 03:41 PM
RecipientControl in Post custom form Bill Outlook - Using Forms 1 May 11th 06 07:32 PM
Script to publish custom form from .OFT to calendar Patrick W. Outlook - Using Forms 2 April 19th 06 02:55 PM
Is it possible to create and publish Outlook Custom Form through VBA ujwalabamishte@gmail.com Outlook - General Queries 3 March 10th 06 09:25 PM
Is it possible to create and publish Outlook Custom Form through VBA ujwalabamishte@gmail.com Outlook - General Queries 1 March 10th 06 02:51 PM


All times are GMT +1. The time now is 01:20 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.