Table of contents
TOC
折叠目录
展开目录

复制方法(针对应用程序的 Visual Basic)Copy Method (Visual Basic for Applications)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

说明将指定的文件或文件夹从一个位置复制到另一个。语法对象复制目标[,覆盖]复制方法的语法包含以下成分:Description Copies a specified file or folder from one location to another. Syntaxobject. Copydestination [, overwrite ] The Copy method syntax has these parts:

部件Part说明Description
objectobject必填。总是一个文件文件夹的名称。Required. Always the name of a File or Folder object.
目标destination必需。将向其中复制文件或文件夹的目标位置。不允许使用通配符。Required. Destination where the file or folder is to be copied. Wildcard characters are not allowed.
重写overwrite可选。 布尔值为True (默认值),如果现有文件或文件夹,则会覆盖;如果它们不是。Optional. Boolean value that is True (default) if existing files or folders are to be overwritten; False if they are not.

备注文件文件夹复制方法的结果是相同的使用FileSystemObject.CopyFileFileSystemObject.CopyFolder文件或文件夹引用的_对象_执行的操作作为一个参数传递。您应注意,但是,使用其他方法都能够复制多个文件或文件夹。Remarks The results of the Copy method on a File or Folder are identical to operations performed using FileSystemObject.CopyFile or FileSystemObject.CopyFolder where the file or folder referred to by object is passed as an argument. You should note, however, that the alternative methods are capable of copying multiple files or folders.

© 2018 Microsoft