This should be fairly simple question. I’m using DocX library to create new word documents. I wanted to make a test word document to see how each TableDesign (enum) looks like to choose the one I need.
Designs\Styles that can be applied to a table.
Namespace: Novacode
Assembly: DocX (in DocX.dll) Version: 1.0.0.10 (1.0.0.10)Syntax:
public enum TableDesign
Member name
Custom
TableNormal
TableGrid
LightShading
LightShadingAccent1
….
And so on. I would like to get a list of those TableDesign’s so i could reuse it in a method creating new table with new design for all possibilities, but I don’t really know how to get the list from that enum:
foreach (var test in TableDesign) {
createTable(documentWord, test);
}
How do I get that?
Found answer myself:
For my specific case I’ve used:
and in testMethod I’ve:
It worked without a problem (even if it was slow, but I just wanted to get things quickly (and being onetimer performance didn’t matter).
Maybe it will help someone in future too 🙂