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

Publish form Issues



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old January 15th 07, 04:30 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Publish form Issues

It looks more or less OK to me.

Does it help any if you cast everything as you retrieve it? Are all your
objects OK if you step the code in the debugger?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"spareway" wrote in message
ups.com...
Hi,

I am trying to publish a form via an outlook addin. When I call
Publish Form, I get an exception that says: one or more paramters are
incorrect.

any ideas?

thanks,

craig


Outlook.MailItem theItem;
Outlook.FormDescription theDesc;

//Environment.GetFolderPath(Environment.SpecialFolde r.Personal)
Ol.MAPIFolder draftFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFo lders.olFolderDrafts);
theItem = (Outlook.MailItem)
this.OutlookApp.CreateItemFromTemplate(formPath, draftFolder);
theDesc = theItem.FormDescription;
theDesc.DisplayName = formName;

Ol.MAPIFolder inboxFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFo lders.olFolderInbox);
theDesc.PublishForm(Outlook.OlFormRegistry.olPerso nalRegistry,inboxFolder
);
theItem.Close(Outlook.OlInspectorClose.olDiscard);


 




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
Can't change form and publish in OL2007 Nick Payne Outlook - Using Forms 5 December 20th 06 12:32 PM
publish form to all users tke402 Outlook and VBA 1 December 20th 06 12:29 PM
Publish custom form MAPI error jharris Outlook - Using Forms 2 November 22nd 06 03:41 PM
Using Access to design a form and then publish it djb Outlook - General Queries 3 September 14th 06 05:22 PM
Publish Form to Outlook Folder Motaad Outlook - Using Forms 2 August 10th 06 01:43 PM


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