S
spareway
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.SpecialFolder.Personal)
Ol.MAPIFolder draftFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFolders.olFolderDrafts);
theItem = (Outlook.MailItem)
this.OutlookApp.CreateItemFromTemplate(formPath, draftFolder);
theDesc = theItem.FormDescription;
theDesc.DisplayName = formName;
Ol.MAPIFolder inboxFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFolders.olFolderInbox);
theDesc.PublishForm(Outlook.OlFormRegistry.olPersonalRegistry,inboxFolder
);
theItem.Close(Outlook.OlInspectorClose.olDiscard);
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.SpecialFolder.Personal)
Ol.MAPIFolder draftFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFolders.olFolderDrafts);
theItem = (Outlook.MailItem)
this.OutlookApp.CreateItemFromTemplate(formPath, draftFolder);
theDesc = theItem.FormDescription;
theDesc.DisplayName = formName;
Ol.MAPIFolder inboxFolder =
OutlookApp.Session.GetDefaultFolder(Ol.OlDefaultFolders.olFolderInbox);
theDesc.PublishForm(Outlook.OlFormRegistry.olPersonalRegistry,inboxFolder
);
theItem.Close(Outlook.OlInspectorClose.olDiscard);