Hello @shma_lo,
To display a MessageBox with formatted text you could use the Xmessagebox interface, plus an injected RichText control to replace the normal plain text control.
When calling the below provided function MessageBox() in the following manner:
Dim strMsg As String : strMsg = "My name is " +chr(2)+ "John " +chr(2)+ "Roberts"
Dim aProps1(0) As New com.sun.star.beans.PropertyValue : aProps1(0).Name = "CharWeight" : aProps1(0).Value = 150.0
Dim aProps2(0) As New com.sun.star.beans.PropertyValue : aProps2(0).Name = "CharColor" : aProps2(0).Value = rgb( 255, 10, 10 )
Dim aStyles() : aStyles = Array( Array(), aProps1, aProps2 )
MessageBox( strMsg, 2, "Family" , 1, aStyles, 170, 40 )
it produces the following dialog on my system Ubuntu 17.10:

To use the MessageBox() function, please copy-paste the entire code section below ( including the “empty” callback methods at the end ), into your Macro Library.
Global g_MessageBox As Object
Function MessageBox( strText$, Optional iMessageBoxType%, Optional strDialogTitle, Optional lMessageBoxButtons, Optional aTextPortionStyleProperties(), Optional lTextFieldWidth, Optional lTextFieldHeight, Optional rTextFieldFont, Optional lDialogPositionX, Optional lDialogPositionY, Optional lDialogBackgroundColor, Optional aButtonLabels(), Optional rButtonFont, Optional dButtonZoom, Optional iButtonPointer%, Optional oParentWindow As Object )
REM Display a customized XMessageBox with formatted text.
REM <strText> : The Message text to display.
REM TextPortions with different formatting can be separated using a Chr(2) character; each TextPortion can have its own Style Properties specified in the <aTextPortionStyleProperties> array.
REM TextPortions without a corresponding Style Properties array will be displayed in the default Font (<rTextFieldFont>).
REM NB. Style properties are reset after each TextPortion, and also after each paragraph break chr(13) and/or newline chr(10).
REM So if you want to include a Chr(13) or Chr(10) character inside your TextPortion, and there are more TextPortions following,
REM then that Chr(13) or Chr(10) character should be directly followed by a Chr(2) character, and a new StyleProperties Array should be added for it into the <aTextPortionStyleProperties> array.
REM [OPTIONAL] <iMessageBoxType> : Integer indicating which type of MessageBox to show; [DEFAULT]=0:
REM 0 = com.sun.star.awt.MessageBoxType.MESSAGEBOX normal message box ( without icon ).
REM 1 = com.sun.star.awt.MessageBoxType.INFOBOX message box to inform the user about a certain event.
REM 2 = com.sun.star.awt.MessageBoxType.WARNINGBOX message box to warn the user about a certain problem.
REM 3 = com.sun.star.awt.MessageBoxType.ERRORBOX message box to provide an error message to the user.
REM 4 = com.sun.star.awt.MessageBoxType.QUERYBOX message box to query information from the user.
REM NB. In the case that iMessageBoxType=INFOBOX, only the OK button will be shown, regardless of the specified <lMessageBoxButtons> value.
REM [OPTIONAL] <strDialogTitle> : String to appear in the MessageBox dialog titlebar; [DEFAULT]= Product Version String.
REM Currently yields Error 448 if the Title string is wider than the Dialog Width.
REM [OPTIONAL] <lMessageBoxButtons>: Long integer combination of com.sun.star.awt.MessageBoxButtons, indicating which buttons are to be shown; [DEFAULT]=65537:
REM 1=BUTTONS_OK; 2=BUTTONS_OK_CANCEL; 3=BUTTONS_YES_NO; 4=BUTTONS_YES_NO_CANCEL; 5=BUTTONS_RETRY_CANCEL; 6=BUTTONS_ABORT_IGNORE_RETRY;
REM + one of : 65536 ...
(more)