views:

75

answers:

1

Is there a way to do a "Single Source Document" in Word via VBA or other techniques. My company creates training and wants to have a "master document" that hosts everything in the training and then from that, create the delivery modalities and materials. For example, a single master course would be able to be queries to output

  • A trainer workbook, a student workbook and PowerPoint slides (for example for an instructor-Led training of 2 days and 4 seperate topics)
  • 4 seperate PowerPoints for 1 hour sessions (for example, for remote delivery via WebEx). This would be a simplified version of the classroom course and that simplification, i.e. what content, would be defined within the single master Word document.
  • Job aids that could be printed for both of the above.

So in all three situations above, the exact same content may appear in 1, 2 or all three of the delivery modalities. In the 2nd one, maybe only 2 things exist there that are not in the other modalities, for example.

My guess is that this would be done in VBA, but I'm not really sure how to get started.

+3  A: 

There are a wide variety of options available for single source publishing (SSP), it depends on what you've got and what you're able to take on in terms of new technologies. Word is not as robust for SSP as some other tools, but in recent years it has become a viable solution.

  • VBA Only:

    If you're using VBA only, you'll have to tokenize your Word document and create patterns to search through and build other documents out of those. For example, you could have a token that is called %%%LESSON%%% (by which you'd search for %%%*%%% to know you've reached a lesson) and then under that in the text you may have %%PPP/Class=True,PPT/Online=True,WRD/Student=False%% to also search on and grab only the parts you're looking for. So if you're creating a student manual with the token above, that section wouldn't appear.

    Personally, I'm not a big fan of this approach as it gets unweildy pretty quickly. But it works with any Word and PowerPoint version and doesn't require learning a lot of new skills or other components.

  • XSL Tranformation (Word 2003):

    If you're primary client is Word 2003, you could use XSL Transforms. There are tons of articles out there on this like: Applying an XSLT Transform. This is really cool technology and made Word, starting with version 2003, a bit of a competitor in the SSP space. Take a look at this article: Creating and Applying an XML Resume Template in Microsoft Office Word 2003.

    While this approach is certainly more robust, there's a steep learning curve if you're not familiar with XML/XSL/XPath. Secondarily, generating PowerPoint slides is not easy at all - (you could need to transform to the PowerPoint 2003 ML).

  • Content Controls & Open XML (Word and PowerPoint 2007 and later):

    Through a combination of Content Controls and Open XML you could definetely get what you you're looking for in terms of SSP. There is a huge learning curve though and you'll have to adopt some outside tools (like Visual Studio, maybe the Open XML SDK, etc.) to get what you want.

    Personally, this is probably the route I'd take, but again, it's pretty steep to go from zero to something good.

Otaku
This is really wonderful, thank you!!!
Mahin
I was thinking, how long would it take to use VSTO to develop a full solution with Content Controls and OpenXml?
Mahin