AnsweredAssumed Answered

Close part or assembly at the end of the macro

Question asked by Stanislao Bazoli on Apr 5, 2018
Latest reply on Apr 6, 2018 by Stanislao Bazoli


I have this macro and I can not close the document at the end of the macro. What am I missing?


Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long


Sub main()


Set swApp = _



Set Part = swApp.ActiveDoc

boolstatus = Part.FeatureManager.EditFreeze(swMoveFreezeBarTo_e.swMoveFreezeBarToEnd, "", True)


Part.SaveAs (Part.GetPathName)


swapp.CloseDoc part.GetTitle()


End Sub