TableCopy 方法 (Project)Application.TableCopy method (Project)

创建活动表的副本, 并将其添加到 "" 下拉菜单中, 并将视图设置为使用新表。Makes a copy of the active table, adds it to the Tables drop-down menu, and sets the view to use the new table.


expressionexpression. TableCopy( _Name_ )

_表达式_一个返回**Application** 对象的表达式。expression An expression that returns an Application object.


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
NameName 可选Optional StringString 所复制的表的名称。Name of the copied table.

返回值Return value



"" 下拉菜单位于功能区上的 "视图" 选项卡上。The Tables drop-down menu is on the View tab on the ribbon. 如果没有指定 Name参数运行 TableCopy 方法时,Project 将显示 保存表对话框。If you run the TableCopy method without specifying the Name argument, Project displays the Save Table dialog box.


TableCopy操作不存储在 "撤消" 列表中。The TableCopy action is not stored in the Undo list.

若要在制作副本时对表功能进行详细控制, 请参阅**TableEditEx** 方法。For detailed control of table features when making a copy, see the TableEditEx method.


如果活动视图是"资源工作表",则以下语句可将资源数据编辑表复制为名为"Copy of Resource Sheet table"的表,然后将"资源工作表"视图设置为使用该表。If the active view is the Resource Sheet, the following statement copies the resource Entry table to a table named "Copy of Resource Sheet table" and then sets the Resource Sheet view to use that table.

TableCopy Name:="Copy of Resource Sheet table"

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.