Hi ,
I'making an application with VBA in Autocad.
I need to save a file NAME, with PATH, of a text file on the dwg file.
I would to open this file on the AcadDocument_Activate event.
Try adding this code to the AcadDocument_Activate() event.....
Code:
Dim retval As Variant
retval = Shell("C:/Windows/notepad.exe " & "C:/filename.txt", vbNormalFocus)
...changing the "C:/filename.txt" for the correct path and filename of the text file you want to load..
With the vbNormalFocus bit, the text file will open infront of the AutoCAD window but not maximised - only about half screen size..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.