[MSWordUtils] Is it possible to concatinate MSWordText
Forge component by Stuart Harris
Application Type
Traditional Web

Is it possible to concatinate MSWordText(s) created with MSWord_MakeText in that way that you get a Text like

"Hello this is a RED text and this a Bold text" 

in the document from 5 MSWordText(s) like 

"Hello this is a " & "RED" & "text and this a " & "Bold " & "text"

If I use MSWord_InsertTextFormat1 for every of this MSWordText(s) I have always LineFeeds between.


Regards Martin

Hello Ricardo,

thanks for your quick response, but I did not understand your solution (its the first time I try to create a word document in OutSystems and also one of my first projects with OutSystems).

But it was very helpfull for me because on the way I try to understand it, I found out an way which works for me.

  1. create a local variable "ListOfMSWordText" as List of Type "MSWordText"
  2. create a local variable "newParagraph" with Type "MSWordParagraph"
  3. create for every different text part (with the different formattings) a MSWordText (with the function MSWord_MakeText() and the fromattings for this text part)
  4. Append this text parts to the List of MSWordText "ListOfMSWordText".
  5. Assign this List of MSWordText "ListOfMSWordText" to the MSWordParagraph "newParagraph"
  6. Use this MSWordParagraph "newParagraph" in the function MSWord_InsertParagraph as parameter InParagraph

I hope this helps other newbies like me.

Regards Martin


Hi Martin,

If I understood your problem correctly, there are two approaches we can follow:

  • Replace the original text with the action for it
  • Create a new document and add the new text in the new document

Hope it helps,

Ricardo Pisco.

Hello Ricardo,

thanks for your quick response, but I did not understand your solution (its the first time I try to create a word document in OutSystems and also one of my first projects with OutSystems).

But it was very helpfull for me because on the way I try to understand it, I found out an way which works for me.

  1. create a local variable "ListOfMSWordText" as List of Type "MSWordText"
  2. create a local variable "newParagraph" with Type "MSWordParagraph"
  3. create for every different text part (with the different formattings) a MSWordText (with the function MSWord_MakeText() and the fromattings for this text part)
  4. Append this text parts to the List of MSWordText "ListOfMSWordText".
  5. Assign this List of MSWordText "ListOfMSWordText" to the MSWordParagraph "newParagraph"
  6. Use this MSWordParagraph "newParagraph" in the function MSWord_InsertParagraph as parameter InParagraph

I hope this helps other newbies like me.

Regards Martin


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.