Hi,
is it possible to set programmatically more than one column in a TextBox?
Like described here: Columns within Text Boxes in PowerPoint 2010
Thanks
Hi,
is it possible to set programmatically more than one column in a TextBox?
Like described here: Columns within Text Boxes in PowerPoint 2010
Thanks
Hi Anton,
Any update on it?
I like to inform that this issue has been resolved. I have shared sample code with you for your kind reference.
public void SLIDESNET_34027_ColumnsTest()
{
string outPptxFileName = Path.Combine(outPath, “ColumnsTest.pptx”);using (Presentation pres = new Presentation()) { IAutoShape shape1 = pres.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 300, 300); TextFrameFormat format = (TextFrameFormat) shape1.TextFrame.TextFrameFormat; format.ColumnCount = 2; shape1.TextFrame.Text = "All these columns are limited to be within a single text container -- " + "you can add or delete text and the new or remaining text automatically adjusts " + "itself to flow within the container. You cannot have text flow from one container " + "to other though -- we told you PowerPoint's column options for text are limited!"; pres.Save(outPptxFileName, SaveFormat.Pptx); using (Presentation test = new Presentation(outPptxFileName)) { Assert.AreEqual(2, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnCount); Assert.AreEqual(double.NaN, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnSpacing); } format.ColumnSpacing = 20; pres.Save(outPptxFileName, SaveFormat.Pptx); using (Presentation test = new Presentation(outPptxFileName)) { Assert.AreEqual(2, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnCount); Assert.AreEqual(20, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnSpacing); } format.ColumnCount = 3; format.ColumnSpacing = 15; pres.Save(outPptxFileName, SaveFormat.Pptx); using (Presentation test = new Presentation(outPptxFileName)) { Assert.AreEqual(3, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnCount); Assert.AreEqual(15, ((AutoShape)test.Slides[0].Shapes[0]).TextFrame.TextFrameFormat.ColumnSpacing); } } }