Preview | SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
PHPeter Hogenstein15/01/2010
Hi,
I watched some discussions about closing active documents.
The solutions other people get just don't seem to be working for me. It should be simple I guess....
I tried the code found here: https://forum.solidworks.com/message/24416#24416
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
swApp = GetObject("", "SldWorks.Application")
swApp.CloseDoc (swModel.GetPathName)
End Sub
Could someone help me with this. Thanks in advance,