Ole Code
Ole Code
IF sy-subrc NE 0.
MESSAGE s000(su) WITH 'Error while creating OLE object!'.
LEAVE PROGRAM .
ENDIF .
*--Getting handle for the selection which is here the character at the
*--cursor position
GET PROPERTY OF gs_application 'Selection' = gs_selection .
GET PROPERTY OF gs_selection 'Font' = gs_font .
GET PROPERTY OF gs_selection 'ParagraphFormat' = gs_parformat .
*--change of line
CALL METHOD OF gs_selection 'TypeParagraph' .
ENDLOOP.
DO 2 TIMES.
CALL METHOD OF gs_selection 'TypeParagraph' .
ENDDO.
SET PROPERTY OF gs_font 'Name' = 'Times New Roman' .
SET PROPERTY OF gs_font 'Size' = '10' .
SET PROPERTY OF gs_font 'Bold' = '1' .
ENDFORM.