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
286 stars 50 forks source link

Field Formatting #142

Open jonlegras opened 1 year ago

jonlegras commented 1 year ago

I don't know if it's because I haven't found it, or if the feature is missing... I am creating a document and adding a table (to the footer). In the table I want page number and date/time. This is fine, I have used fields for Page and Date/Time but I can't see how to format the date time.

The date appears as m/d/yyyy (USA format), but I'd like to apply custom formats, which I can do in the actual word document.

Is it possible to do this using OfficeIMO / OpenXML?

PrzemyslawKlys commented 1 year ago

I am not sure if this will help:

But I would guess you need to try and apply TIME \@ "HH:mm:ss" or similar

I've not spent a lot of time with fields after it was rebuilt.