Project Description
A Word 2010 Add-in that converts the Office Open XML (WordprocessingML) to XAML:
For WPF, the document is converted into a FlowDocument element.
For Silverlight 4, the document is converted into either a StackPanel element containing TextBlock elements or a RichTextBox.

If you are running Office 2013, try the new Xaml Generator app for Office.

Usage

  1. Build and run the WordToXaml project - this should start Microsoft Word
  2. You should see a XAML Tab on the Microsoft Word Ribbon Interface
  3. Open any document in Microsoft Word
  4. Switch to the XAML Tab and select the appropriate options
  5. You can preview the WPF or Silverlight document directly from Word by pressing the Preview button
    1. Previewing the Silverlight XAML opens the XAML in a test Silverlight page running on the file system (You'll need to approve the Silverlight plug-in here). You can then copy the XAML directly from there.
  6. From the File menu select Save & Send...XAML Document to save the XAML document to a file
SaveAndSendXamlDocument.png

XamlRibbon.png

FlowDocument Preview

FlowDocument Preview

Silverlight Preview

Silverlight Preview