I have autocad open with a drawing loaded. I want my program to get the path of the drawing. This code starts a new session of autocad. I am guessing it has to do with the set statement and the use of the new keyword. Is there a different key word. Every text I have uses the new key word.

Option Explicit

Private Sub Command1_Click()
Dim x, y
Dim AC As AutoCAD.AcadApplication
Set AC = New AutoCAD.AcadApplication
x = AC.ActiveDocument.Path
MsgBox (x)
End Sub
Thank you for your time and have a good day

------------------
I am so skeptacle, I can hardly believe it!