EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
280 stars 50 forks source link

Field Codes as a domain model #78

Open byteSamurai opened 1 year ago

byteSamurai commented 1 year ago

At the moment, field codes take parameters only as a list of strings. Though this approach is quite flexible, it would be nice to provide a typed-based abstraction of the different field codes.

The complete list is available here: https://support.microsoft.com/en-us/office/list-of-field-codes-in-word-1ad6d91a-55a7-4a8d-b535-cf7888659a51

The current WordFieldType enum needs to be refactored so that each value of the Enum becomes a class, which encapsulates possible instructions and switches of a field code. As an example, an ASK field code class might look like this:

image

byteSamurai commented 1 year ago

@PrzemyslawKlys If this issue is still open while the next Hacktoberfest, count me in 😄

PrzemyslawKlys commented 1 year ago

I think you can already start preparing 😂🤣