That worked for me!!! wink

Code:
MoveTo(0,0)
MoveTo(&Width,&Height)
Define(&LocalVariable,string,@(1,1,200))
Set(&LocalVariable,@(1,1,200))
define(&i,measure,20)
define(&lineWidth,measure,0)
define(&widthFound,boolean,false)

Margin(0.0000,0.0000)

%Loop through your data text on each encounter of ||
search(&LocalVariable,'||')
    &widthFound := false
    %Loop until a proper font size is found
    repeat
          setstyleext(&style1,&i,0,[100],100)
          if(stringwidth(&LocalVariable) > &width)
             &i := &i - 0.1
          else()
             &widthFound := true
          endif()
    until(&widthFound)

    BeginParagraph(0.0000,&Width,0.0000,'left',0.1667,False)
           setstyleext(&style1,&i,0,[100],100)
           Show(&LocalVariable)
    EndParagraph()
endsearch()

%repeat one more time as the variable &LocalVariable still contains the rest of the text after the last ||
&widthFound := false
repeat
      setstyleext(&style1,&i,0,[100],100)
      if(stringwidth(&LocalVariable) > &width)
         &i := &i - 0.1
      else()
         &widthFound := true
      endif()
until(&widthFound)

BeginParagraph(0.0000,&Width,0.0000,'left',0.1667,False)
       setstyleext(&style1,&i,0,[100],100)
       Show(&LocalVariable)
EndParagraph()

_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫