The approach that I took was to develop a VSTO Word Template application that would step the user through the process of selecting the spreadsheet, reading the data and finally processing the data.
Step One - Creating the Application
To create a Word Template application is relatively straight forward. From the New Application dialog browse for Office > 2007 > Word 2007 Template. You should now be presented a .dotx file that you can now customise to your hearts content.
Step Two - Adding the Controls to Template
Not having worked with a VSTO application before I simply copied the RichTextContentControl from an example application I found. However, like any .Net application all the controls that can be utilised in the Word Template can be found in the toolbox. (Thanks Mr Obvious!)
Here's what mine looked like...
Step Three - Adding the Actions Pane Control
Just having some controls embedded in a template isn't going to do a lot, you need some way for the users to interact with the template. This is where the Actions Pane Control comes in play.
Here's what mine looked like...
So you can basically added all manner of controls to the Action Pane and treat it like a Windows Form.
Step Four - Deploying
Developing all of the above is fairly straight forward, just like developing a web/win app, F5 and away you go. But how to deploy that was a little different.
Googleing "How to deploy a VSTO word template application" and the like continued to give me information on the problems people were having. Not very helpful! Thankfully due to the awesome resources available from Readify I was eventually pointed to the following links:
- Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 1 of 2)
- Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 2 of 2)
- Deploying Solutions for the 2007 Office System with ClickOnce Using Visual Studio 2008 Professional
These links are your one stop shop for deploying VSTO applications.
Enjoy!
[Edit]
I also came across these screencasts yesterday. They provide an awesome walk through of the deployment process.
VSTO: Deployment via ClickOnce screencast and VSTO: Deployment via SharePoint
Next: Installing Pre-Requisite Assemblies For VSTO Applications
Nice Article. Helped a lot - Thanks!
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete