Mon Jan 17, 2011 11:16 am
Thanks for your inquiry.
You just need to call AddColumn method of your section, and append content to that section as usually.
There is a demo which adds two columns into a section:
- Code: Select all
Document document = new Document();
Section section = document.AddSection();
//the unit of all measures below is point, 1point = 0.3528 mm
section.PageSetup.PageSize = PageSize.A4;
section.PageSetup.Margins.Top = 72f;
section.PageSetup.Margins.Bottom = 72f;
section.PageSetup.Margins.Left = 89.85f;
section.PageSetup.Margins.Right = 89.85f;
section.AddColumn(section.PageSetup.ClientWidth / 2 - 20, 10);
section.AddColumn(section.PageSetup.ClientWidth / 2 - 20, 10);
for (int i = 0; i < 300; i++)
{
section.AddParagraph().AppendText(String.Format("Paragraph_{0}", i));
}
//Save doc file.
document.SaveToFile("Test.doc", FileFormat.Doc);
//Launching the MS Word file.
System.Diagnostics.Process.Start("Test.doc");
Harry
Technical Support / Developer,
e-iceblue Support Team