Skip to Content
0
Former Member
Oct 07, 2005 at 10:20 AM

How to make a Carriage Return in a Word-Table by OLE Automation

130 Views

I generated a Table in a Word-Document by using the OLE2 Interface.

After that I wrote a Text in the first cell of the table.

Now I want to make a Carriage Return to write another Textline in the same Cell.

But first i must move the cursor to the end of the Text.

I haven't already figured that out.

Can someone Help me?

I tried this but then the Cursor moves to the Begin of the second Cell in the same row.

*Writing the Text in the Cell
  GET PROPERTY OF o_cell 'Range' = o_range.
  SET PROPERTY OF o_range 'Text' = wa_anschr-ename.

*Move Cursor
  GET PROPERTY OF o_cell  'Range' = o_range.
  GET PROPERTY OF o_range 'End' = ld_pos.
  SET PROPERTY OF o_range 'Start' = ld_pos.
  CALL METHOD OF o_range ' Select'.