SAMI_JGD

Hi All,

I am new to VSTO 2005. I want to my word template 2003/2007 project to be open using the Sharepoint Services over LAN/WAN/Internet.

Thanks

sami




Re: Visual Studio Tools for Office Word Template 2007

Richard Cook - MSFT

Sami,

I need a little more information before I can answer your question. If you could answer the following questions I may be able to help you:

  • How did you create the Word template
  • Has the Word template been customized using Visual Studio 2005 i.e. Does it contain managed code (C#/VB) created using the "Word template" C# or VB project from Visual Studio

Thanks, Richard.





Re: Visual Studio Tools for Office Word Template 2007

SAMI_JGD

Hi Richard,

Here the answer for your questions,

  • I created my template using the word 2003.
  • Yes, This template has been cutomized using the VSTO 2005 (C#).

Actually I have used one table im my word template to show the customer details based on the CustomerID from the DataSet. If I select the customerID then the relevent info will be mapped in my word template.

I hope these info will be helpful for you.

thank you.

regards

Sami






Re: Visual Studio Tools for Office Word Template 2007

Richard Cook - MSFT

Sami,

In order to publish to SharePoint, there is one main issue that needs to be addressed: the VSTO publish wizard does not allow direct publication of a VSTO customization to a SharePoint site. Instead you'll need to publish to a local directory and then change the application manifest so that the embedded application path.

You'll need knowledge of the following tools to complete these steps:

  • Creating web folders under "My Network Places" to allow copying of files into a SharePoint server application directory.
  • The VSTO Application Manifest Editor tool to edit the application path of a VSTO solution.

The steps you'll need to take are as follows:

  1. Open the customization in Visual Studio 2005.
  2. Make sure the solution builds cleanly.
  3. Invoke the publish wizard by right-clicking on the Word document project in Solution Explorer and selecting "Publish...".
  4. Under "Specify the location to publish this application" leave the default value "publish\" (you cannot directly publish to a SharePoint site) and click "Finish".
  5. This will rebuild the application and publish it to the directory "publish" directly beneath the project directory.
  6. Make a note of the final location (URL) of the document within the SharePoint application (it'll be of the form http://myserver/mysite/mydocumentlibrary) and map a web folder to it under "My Network Places" (see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/using_webfolders_for_file_transfer.mspx mfr=true for more information).
  7. Open the .doc file in the local "publish" directory using the VSTO Application Manifest Editor (see http://msdn2.microsoft.com/en-us/library/ms268756(VS.80).aspx for more information) and change the "DeploymentManifestName" property to match the URL of the customization's .application file (this will be something like http://myserver/mysite/mydocumentlibrary/mydocument.application) and save the modified file.
  8. Copy the contents of the "publish" directory to the SharePoint application by copying the files into the web folder created in step (6).
  9. The document should now be available from the SharePoint application.

I hope this helps you! Let me know if you need any clarification.

Thanks, Richard.





Re: Visual Studio Tools for Office Word Template 2007

SAMI_JGD

Hi Richard,

Thank you so much for your timings and answer. Sorry I was unable to response your mail immediately.

I will follow your instructions and mail you if I have any more clarifications.

Thanks once again.

Regards, sami.