Hiding bookmark selection

  • Goodmorning, is it possible to hide (or show) the text into a bookmark?

    This works

    Code
    if WP.BookmarkSelect('pippo',false) then wp.TextCursor.CurrAttribute.ToggleCharstyle(WPSTY_HIDDEN);


    ...
    but this don't

    Code
    if WP.BookmarkSelect('pippo',false) then
       begin
           if SHOW then
               wp.TextCursor.CurrAttribute.SetCharstyles(WPSTY_HIDDEN,0)
           else
               wp.TextCursor.CurrAttribute.SetCharstyles(WPSTY_HIDDEN,1);
       end;

    I don't want to toggle the hidden attribute of selected text (bookmark), I want to set.
    Best regards, Mario