InsertDatabase Method Example

This example inserts a Microsoft Excel spreadsheet named "Data.xls" after the selection . The Style value (191) is a combination of the numbers 1, 2, 4, 8, 16, 32, and 128.

With Selection
    .Collapse Direction:=wdCollapseEnd
    .Range.InsertDatabase _
        Format:=wdTableFormatSimple2, Style:=191, _
        LinkToSource:=False, Connection:="Entire Spreadsheet", _
        DataSource:="C:\MSOffice\Excel\Data.xls"
End With