When I run Grahams code it works perfectly for word 2016 with no issues. Only when the document has a table in it does this code give an error message.
Sub Test2Columns() Selection.WholeStory Selection.ConvertToTable Separator:=wdSeparateByTabs, NumColumns:=2 With Selection.Tables(1) .Style = "Table Grid" .ApplyStyleHeadingRows = True .ApplyStyleFirstColumn = True With .Columns(1) .Cells.Merge ‘.AutoFit End With With .Columns(2) .Cells.Merge ‘.AutoFit End With End With End sub




Reply With Quote
