返回一个 Columns 集合,该集合代表在某一区域、所选内容或表格中所有表格列。只读。
有关返回集合中单个成员的内容,请参阅返回集合中的对象。
本示例显示活动文档的第一个表格中的列数。
If ActiveDocument.Tables.Count >= 1 Then
MsgBox ActiveDocument.Tables(1).Columns.Count
End If
本示例将当前列的宽度设置为 1 英寸。
If Selection.Information(wdWithInTable) = True Then
Selection.Columns.SetWidth ColumnWidth:=InchesToPoints(1), _
RulerStyle:=wdAdjustProportional
End If