・ ファイルを閉じる
ファイルを閉じるには、Close メソッドを使います
シングルドキュメントモードでは、ファイルを閉じることはできません
現在アクティブな図面を閉じる
ActiveDocument.Close
現在アクティブな図面を変更を保存しないで閉じる
ActiveDocument.Close SaveChanges:=False
現在アクティブな図面を変更を保存して閉じる
ActiveDocument.Close SaveChanges:=True
'*************************************************************************
'シングルドキュメント環境でファイルを閉じて、別のファイルを開く
'*************************************************************************
Sub Jo_close_open()
Dim ACADPref As AcadPreferencesSystem
Dim originalValue As Boolean
Set ACADPref = ThisDrawing.Application.preferences.System
originalValue = ACADPref.SingleDocumentMode
ACADPref.SingleDocumentMode = False
ActiveDocument.Close SaveChanges:=False
Documents.Open ("D:\bs2\temp\vba_test.dwg")
ACADPref.SingleDocumentMode = originalValue
Set ACADPref = Nothing
End Sub