With this code, the text inside the table is not vertical/stacked (in powerpoint jargon) as i expect it to be. It is vertical in the independent text frame, however. Please help me with this, I am on a tight deadline. Any help is sincerely appreciated.
PS: I had already created the table inside the existing ppt.
using (Presentation presentation = new Presentation(dataDir)) {
// Access the first slide
ISlide sld = presentation.Slides[0];
IAutoShape someShape =
sld.Shapes.AddAutoShape(ShapeType.Rectangle, 0, 0, 100, 100);
ITextFrame someFrame = someShape.AddTextFrame(“some text”);
someFrame.TextFrameFormat.TextVerticalType = TextVerticalType.Vertical;
// Initialize null TableEx
ITable table = null;
// Iterate through the shapes and set a reference to the table found
foreach (IShape shape in sld.Shapes)
if (shape is ITable)
table = (ITable)shape;
// Set the text of the first column of second row
table[0, 1].TextFrame.TextFrameFormat.TextVerticalType = TextVerticalType.Vertical;
table[0, 1].TextFrame.Text = “New”;
// Write the PPTX to Disk
presentation.Save(dataDir + “UpdateTable_out.pptx”, SaveFormat.Pptx);
}
Thanks,
Rajat
Thanks,
Rajat