1

I have a legacy app which heavily uses Custom XML. A user provides a Word doc littered with custom XML (letter template), and then the code uses the custom XML tags to insert data from the DB thus dynamically turning the template into a full fledged Word doc.

However, as some of you are aware, Microsoft was sued over custom XML and lost back in 2009. Versions of Word 2003 and later now automatically convert custom XML tags to generic tags which of course breaks the parsing/data insert logic (ASPX/C#, .Net 3.0) on the app.

The department using this app doesn't really have the budget to fully re-write this logic, so I have a few questions. Are there any alternatives/ways around this (give users copies of Word 2003 might be too extreme haha)? I've herd OpenOffice might have support for this as well. Has anyone else had to deal with the outcome of this lawsuit, and if so what did you guys do?

Finally, if a re-write is the only option, whats the most time efficient way to replicate what custom XML was doing in work? I've herd of bookmarks or other such things but I'm not really a Word expert.

Let me know if you need any more information!

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Hershizer33
  • 1,206
  • 2
  • 23
  • 46
  • I hope you're not using Office Interop from ASP.NET. It is a horrible idea to use Office Interop from ASP.NET or another server technology. These APIs were written for use in a desktop application, for automating Office (a suite of desktop applications). Server applications are different in many ways that make it a very, very bad idea to use Office Interop in them. It's also unsupported by Microsoft, and may violate your Office license. See [Considerations for server-side Automation of Office](http://support.microsoft.com/kb/257757) – John Saunders Oct 09 '14 at 18:14
  • Haha no no, no interop. Basically the user had created and saved these templates in word AS xml, and then the app just uses the built-in .NET xml parsing stuff. The problem caused by the lawsuit is now when you open a xml doc made in word with those custom tags its rips them out and the xml parsing logic can't find the tags anymore, so the XMLDoc ends up being null. So the user can't make anymore new templates or even change old ones. – Hershizer33 Oct 09 '14 at 18:18
  • 1
    I have to say that giving users copies of Word 2003 is about the same order of magnitude of optimality as waiting until five years after the lawsuit to do something about this problem. – John Saunders Oct 09 '14 at 18:20
  • I agree with you there, I new here and this app is ~8 years old so not much I can do about it now besides try to make it work. – Hershizer33 Oct 09 '14 at 18:21

1 Answers1

1

There's Custom XML and Custom XML content control data binding. The latter was not the subject of the patent suit, and would work well for your purposes. Office 2007 and later though.

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
  • Interesting. Not a word wizard so I wasn't aware of this. Seems to be a bit more involved and less user friendly than Custom XML, but essentially does the exact same thing... I'll play around with it for sure. Thanks! (PS: It looks like if I name the custom controls the same name as the Custom XML had for each item I might not even have to change the parser?) – Hershizer33 Oct 09 '14 at 20:55