ConvertToTable Method Example

This example converts the first three paragraphs in the active document to a table.

Set aDoc = ActiveDocument
Set myRange = aDoc.Range(Start:=aDoc.Paragraphs(1).Range.Start, _
    End:=aDoc.Paragraphs(3).Range.End)
myRange.ConvertToTable Separator:=wdSeparateByParagraphs

This example inserts text at the insertion point and then converts the comma-delimited text to a table with formatting.

With Selection
    .Collapse
    .InsertBefore "one, two, three"
    .InsertParagraphAfter
    .InsertAfter "one, two, three"
    .InsertParagraphAfter
End With
Set myTable = _
    Selection.ConvertToTable(Separator:=wdSeparateByCommas, _
    Format:=wdTableFormatList8)