Mail Merge Specification: Technology Investigation - MS Office Interop

From OpenPetra Wiki
Revision as of 12:29, 29 July 2013 by Christiankatict (talk | contribs) (Created page with '=WORK IN PROGRESS= '' '''THIS PAGE IS WORK IN PROGRESS!''' '' '''NOTE:''' Please refer to the [[Specification for Mail Merge (former 'Form Letters' in Petra 2.x)#Terminology|Ter…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WORK IN PROGRESS

THIS PAGE IS WORK IN PROGRESS!

NOTE: Please refer to the Terminology for the exact definition of words and phrases!


Technology Under Investigation

Name: Microsoft.Office.Interop.Word Library
What is it: .NET Interop Wrapper libraries supplied by MS for MS Word Automation through COM
Internet Site: [1]


Pros and Cons

  • Proprietary and Windows-OS / COM based: If those libraries are used then the technology would be restricted to the Windows Operating System (whether the technology would be used client or server side) - which is not that desirable.
  • However, if no other technology can be found that could provide what we need then this restriction would be acceptable, BUT in that case it must be ensured - to the maximum extent possible - that the implementation of Mail Merge in OpenPetra could be changed to another technology at some point in the future with as little change as possible (i.e. a major 're-write' of the Mail Merge Sub-Module would not be acceptable!).

Investigation Notes

MSDN Article on how to Drive Mail Merge in MS Word

  • This article provides guidance on how to use the wrapper library to work with 'Merge Fields' and how to perform Mail Merging.
    • One thing that we wouldn't want to do as it is done in this article is to create the Mail Merge Document from scratch in C# code - that would not allow the user to set up such documents!
    • What might be particularly interesting in this example is the creation of Tables (search for comment '// Insert a new table with 9 rows and 4 columns' in the article) - though that doesn't insert 'Merge Fields' it might provide the option to build Tabular Data Placeholders - either by filling in 'MS Word Merge Fields'/Placeholders into Cells, or by building Tables manually after mail merging through MS Word has taken place (for that the Merged Document would need to be re-opened and a manually constructed Table would need to be inserted at a specific Placeholder, much like the code in the example demonstrates).


Conclusion

TODO


Decision: Whether to Use That Technology or Not, and Why

TODO