I set my folder path and open the file:
Path = "*PUT YOUR FOLDER HERE"
sFileName = Dir(Path & "*.sldasm")
Do Until sFileName = ""
Set swModel = swApp.OpenDoc6(Path + sFileName, swDocASSEMBLY, swOpenDocOptions_Silent, "", nErrors, nWarnings)
After I have finished running the macro I close out the document and loop the do loop:
Set swModel = Nothing
sFileName = Dir
Could you please format my macro as per your suggestion just so I have a full example to work to? I attempted to do it myself but unfortunately it didn't work correctly.