Hi!
Hi Alejandro,
Thanks for your inquiry.
Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate as to how you want your final Word output be generated like. We will then provide you more information on this along with code.
thank you for the answer
Hi Alejandro,
Thanks for your inquiry. In your case, we suggest you please insert the text ‘TITLE OF DOCUMENT’ in separate Section and column’s contents in separate Section.
Please insert the text ‘TITLE OF DOCUMENT’ at the start of document and then insert section break of type continues. After this section break, please create the columns and insert your desired column’s contents.
Hope this helps you. Please let us know if you have any more queries.
I’m trying but I can’t do it works.
I got this, I don’t know what is wrong
Hi Alejandro,
Thanks for your inquiry. Please check following code example for your kind reference. Hope this helps you. Please let us know if you have any more queries.
Document doc = new Document();<o:p></o:p>
DocumentBuilder builders = new DocumentBuilder(doc);
builders.getFont().setName("Times New Roman");
builders.getFont().setBold(false);
builders.getFont().setItalic(false);
builders.getFont().setSize(20);
builders.getFont().setColor(Color.BLACK);
builders.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);
builders.writeln("Title of document");
builders.insertBreak(BreakType.SECTION_BREAK_CONTINUOUS);
TextColumnCollection columns = builders.getPageSetup().getTextColumns();
columns.setCount(2);
columns.setSpacing(100);
builders.writeln("Text in column 1.");
builders.insertBreak(BreakType.COLUMN_BREAK);
builders.writeln("Text in column 2.");
doc.save(MyDir + "Out.docx");
It works ! thank you !
Hi Alejandro,
Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.