I am writing a MSProject 2010 add in, I would like to prevent users from creating a site for the project (this option appears on the dialog box when one selects "Publish" from the MS Project menu) I have an handler for the ProjectBeforePublish event, the event provides a cancel parameter. I tried to use that event handler to cancel the publish request initiated by theuser from the menu and then call the Application.Publish( bool Republish, string WssURL) the site is created though I pass NULL to WssURL. Any help would be apprieciated.
MSDN Ref: Sends message to the Project Server Queueing Service to publish the local project cache to Project Server, and optionally to the associated SharePoint site for the project workspace. Project Professional only.
Republish | Optional | Boolean | If True, publish the entire project plan. |
WssUrl | Optional | String | URL for the SharePoint site where the project workspace is to be provisioned. If NULL, no workspace is provisioned. |