I got two questions:
I would like to convert text to a table. The text to be converted ...
... starts from paragraph 2 and ends at the very end of the document.
... The separator is to be 'COMMAS'.
I am using below code. It works fine but I'd rather use a range object instead of the selection object.
The macro "InsertOneRowAboveTheFirst
One" inserts a row above the first one. I would like to enter text in each cell of the newly created table row. How is this achieved using VBA?
Help is much appreciated. Thank you very much in advance.
I have attached a sample file for your convenience.
Regards, Andreas SAMPLE-FILE-TABLE-MACRO.docx
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Dim tbl as table
Dim rng as range
Dim rows as rows
Set tbl = ActiveDocument.Tables(1)
Set rng = tbl.rows(1).Range
Set rows = rng.rows