Hi All, We are generating a word doc from word template (and open off

Hi All,

We are generating a word doc from word template (and open office .odt from .odt template) using the doc generation nodes. Now when we want to add rich text to this documents it fails.

The generated file is corrupt. I have given a rich text enabled paragraph and saving that in PV. ON next form I can display the text stored in PV as rich text but when I pass the same PV to document node and generate a document it fails.

Please suggest how to generate a document which can have rich text (multiple lines, bold , italics for few lines)

Thanks,
Rajat...

OriginalPostID-63716

OriginalPostID-63716

  Discussion posts and replies are publicly visible

Parents
  • I tried that also but failed. Are you using DOCX files? These are a zipped collection of XML and other files. Appian replaces the keys (###key###) in the XML directly with your rich text which is HTML formatted. By doing this the XML syntax breaks.

    I turned of rich text in the forms and allowed the users to use line breaks to format their text. These line breaks are converted to <w:br /> using this expression

    =substitute(tohtml(striphtml(substitute(ri!text, char(10), "**w:br**"))), "**w:br**", "<w:br />")
Reply
  • I tried that also but failed. Are you using DOCX files? These are a zipped collection of XML and other files. Appian replaces the keys (###key###) in the XML directly with your rich text which is HTML formatted. By doing this the XML syntax breaks.

    I turned of rich text in the forms and allowed the users to use line breaks to format their text. These line breaks are converted to <w:br /> using this expression

    =substitute(tohtml(striphtml(substitute(ri!text, char(10), "**w:br**"))), "**w:br**", "<w:br />")
Children
No Data