On Error Resume Next Dim oAcad Set oAcad = GetObject(, "AutoCAD.Application") If Err Then Err.Clear Set oAcad = CreateObject("AutoCAD.Application") End If Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") Dim oCmd Set oCmd = WScript.Arguments With oAcad .Visible = True .WindowState = Normal .Documents.Open oCmd(0), True WshShell.AppActivate(.caption) End With