Hi Team,
We are creating a word document using document template file (dotx) file.
Let us take we have a mail merge field “FailureDescription” and we are writing the information reading from database.
Let us assume the value present in database is “This is Failure Description testing Only. Please ignore this.”
After generation of document let us assume we have modified the text style of “Failure Description testing” ( from the total text “This is Failure Description testing Only. Please ignore this.”) to bold
So now the text present is
“This is Failure Description testing Only. Please ignore this.”.
Then we are trying to get the text present between the two styles we defined in the word document and saving again back to database.
We are getting the text fine as “This is Failure Description testing Only. Please ignore this.”. However lost the formatting.
So again if we are writing back to report after saving that to database, the styling is not present. It coming as
“This is Failure Description testing Only. Please ignore this.” instead of
"This is Failure Description testing Only. Please ignore this.
ArrayList failureDescFAArray = DAL.ParagraphsByStyleName(doc, "Failure FADescription");
ArrayList summaryFAAnalysis = DAL.ParagraphsByStyleName(doc, "Summary FAAnalysis");
ArrayList failureDescFANodes = DAL.ExtractContent((Node)failureDescFAArray[0], (Node)summaryFAAnalysis[0], false);
failDesc = DAL.GenerateDocument(doc, failureDescFANodes).GetText();
Could you please help me on this?
Regards,
Rajesh