• Cool. The Word template is what I've been looking for. I built an aspx app to display table columns in a grid, but could not figure out how to get our doc pages in SharePoint to embed that output.

    For a particular table, I wanted the column attributes as well as the description info, so used something like this:

    SELECT C.ColumnName, DataType, Length, NullsAllowed, DefaultValue, Description FROM

    (SELECT COLUMN_NAME AS ColumnName,

    DATA_TYPE AS DataType,

    CHARACTER_MAXIMUM_LENGTH AS Length,

    IS_NULLABLE AS NullsAllowed,

    COLUMN_DEFAULT AS DefaultValue

    FROM Information_Schema.Columns

    WHERE Table_Name = @Table) AS C

    LEFT OUTER JOIN

    (SELECT objname AS ColumnName, value AS Description

    FROM fn_listextendedproperty (Default, 'schema', 'dbo', 'table', @Table, 'column', default)

    WHERE name = 'MS_Description') AS D

    ON C.ColumnName COLLATE Latin1_General_CI_AS = D.ColumnName