Sub 复制文件()
Dim path$
Dim path1$
Dim path2$
Dim MyFile As Object
Set MyFile = CreateObject("Scripting.FileSystemObject")
path = ThisWorkbook.path
path1 = path & "\A\灵飞经.pdf"
path2 = path & "\B\灵飞经.pdf"
MyFile.copyfile path1, path2
Set MyFile = Nothing
End Sub
If (Right(f1, 3) = "DF" Or Right(f1, 4) = "DOCX") And InStr(1, f1, "OK") <= 0 Then 我改成If (Right(f1, 4) = "DOCX" Or Right(f1, 3) = "DF") And InStr(1, f1, "OK") Then