I am trying to set the vertical alignement of a cell in my tabel to be "centre" but I am not succeeding.
const Analysis = new docx.Paragraph("This text should be in the middle of the cell");
table.getCell(6, 0).addContent(Analysis).CellProperties.setVerticalAlign("CENTER");
When I try open the word document in windows 10, with Microsoft Word 365, then it gives an error:
We're sorry. We can't open DocumentName.docx because we found a problem with its contents.
Details
Unspecified error
Location: Part: /word/document.xml, Line: 0, Column: 0
Any idea or help? Am I assigning the setVerticalAlign(type: VerticalAlign) correctly?
I saw that the type is defined as follows:
export enum VerticalAlign {
BOTTOM = "bottom",
CENTER = "center",
TOP = "top",
}
I am trying to set the vertical alignement of a cell in my tabel to be "centre" but I am not succeeding.
const Analysis = new docx.Paragraph("This text should be in the middle of the cell");table.getCell(6, 0).addContent(Analysis).CellProperties.setVerticalAlign("CENTER");When I try open the word document in windows 10, with Microsoft Word 365, then it gives an error:
We're sorry. We can't open DocumentName.docx because we found a problem with its contents.
Details
Unspecified error
Location: Part: /word/document.xml, Line: 0, Column: 0
Any idea or help? Am I assigning the setVerticalAlign(type: VerticalAlign) correctly?
I saw that the type is defined as follows:
export enum VerticalAlign {
BOTTOM = "bottom",
CENTER = "center",
TOP = "top",
}