Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
6 subscribers
Views
4230 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi All, We are generating a word doc from word template (and open off
rajat_marathe
over 12 years ago
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
0
Siva
Certified Lead Developer
over 12 years ago
Hi, you can use RTF template(.rtf) instead of Open Office template. If you create RTF documents using the Text Doc from Template node, then those RTF files can be opened in Microsoft Word.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shelzle
over 12 years ago
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 />")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
peterh
over 11 years ago
shelzle, did you ever find a solution for this? Our business is requesting it as well and we do a lot with docx templates.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shelzle
over 11 years ago
No, sorry. I think this is beyond Appian OOTB possibilities. Converting some wildly formatted HTML text to a valid DOCX is not that easy. Maybe you can develop a custom plugin that uses some libraries that are able to do that.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel