views:

475

answers:

2

I'm looking for some options to programmatically create a Word document from within a Silverlight 4 application. I found two approaches which seemed promising at first but don't look like they will work.

OpenXML SDK The OpenXML SDK isn't available for Silverlight at this time.

Word Automation via COM Interop

dynamic wordApplication = AutomationFactory.CreateObject("Word.Application");

Apparently this requires that the Silverlight 4 application be granted permission to run with elevated privileges, which is only available for out-of-browser applications (which ours isn't)

My other thought is to hand off the request to a back-end service which doesn't have these limitations. I wanted to check for any ideas before going down that path.

A: 

http://www.perpetuumsoft.com/Report-Sharp-Shooter-for-Silverlight.aspx

Steav
This looks like a reporting tool ... I don't think there's a fit here
George Durzi
This product generates a Word doc for Silverlight applications
Steav
A: 

A back-end service is the way to go. Neither Open XML SDK (the easy way) or System.IO.Packaging (the harder way) is available from Silverlight, so server-side generation is the only real option here. You can do it yourself (which would be my preference), or use tools such as OfficeWriter or Sharp Shooter (mentioned in another answer). The plus side of a back-end solution is that you wouldn't have anyone decompiling your Word-creation code with tools like Reflector.

Otaku