新手刚刚入门,编辑的代码无法关闭图纸,请教高手指点。代码如下
-
- n = InStrRev(ActiveDocument.FullName, "\")
- filepath = Left(ActiveDocument.FullName, n)
- For i = 0 To files.ListCount - 1
- filepath = filepath + files.List(i)
- On Error Resume Next
- ThisDrawing.Application.Documents.Open filepath, True
- For Each doc In Documents
- If doc.FullName = filepath Then
- doc.Close
- End If
- Next
- Next
|