Option Explicit
Dim mdl ' the current model
Set mdl = ActiveModel
Dim Tab 'running table
Dim col_1
Dim col_2
Dim col_3
Dim col_4
' 定義屬性變量
for each Tab in ActiveModel.Tablescode
Set col_1 = Tab.Columns.CreateNew
Set col_2 = Tab.Columns.CreateNew
Set col_3 = Tab.Columns.CreateNew
Set col_4 = Tab.Columns.CreateNew
'添加公共字段 by Sinublog
col_1.name = "建立人"
col_1.code = "CJR"
col_1.DataType = "varchar(50)"
col_1.comment= "建立人"ci
col_2.name = "建立時間"
col_2.code = "CJSJ"
col_2.DataType = "datetime"
col_2.comment= "建立時間"it
col_3.name = "修改人"
col_3.code = "XGR"
col_3.DataType = "varchar(50)"
col_3.comment= "修改人"io
col_4.name = "修改時間"
col_4.code = "XGSJ"
col_4.DataType = "datetime"
col_4.comment= "修改時間"table
next
MsgBox "success"class