Hello,
I am using Docx extension to create a word document . I need to create a document in the below format
A list with subpoints in it (with no bullet points)
Thanks,
Asiyah
See this one https://amitj.outsystemscloud.com/MSWordUtils_Sample/Sample.aspx?_ts=638917292405086427
Use
NewLine()+ Chr(9)+ "subline for line 2" for the subline https://amitj.outsystemscloud.com/MSWordUtils_Sample/Sample.aspx
Please find oml with Sample page. Let me know if its not helpful.
So you can use Chr(9) to add tab with in any string. See the url and oml and let me know in case of any help
Although the above solution is creating tab but if the sublines are larger then this solution isnt working as i need to again add chr(9) in between to create tabs
Sharing ss:
Since there’s no direct option available, we’ll need to split the long string by character length and build it step by step, for example:
H1 Generates a document and inserts a list" + NewLine() +Char(9) + "Subline for Line" + NewLine() +Char(9) + "2nd Subline for H1
Meanwhile, I’ll also check if another approach is possible.
Hi Approach that you can do if text is fixed. Using Docx Template (Recommended)
Create a Word Template (.docx) with:
H1 and H2 headings using Word styles.
Sub-lines as plain text (do not apply bullet or numbering).
In OutSystems:
Use GenerateDocxFromTemplate action from the Docx extension.
Pass your data in a JSON structure.
Ensure your template uses placeholders like:
${Heading1}
${Subline1}
${Subline2}
${Heading2}
${Subline2}and replace these placeholders with the dynamic text. let me know if text have dynamic and no predefined format.
Hi Amit,
Thankyou for helping me out .
I dont want to use the template as
I am having dynamic list and sublist .
I dont have a predefined static format .There could be other text in the document based on the user's input .
Thanks