Have SW open files from path but also the subdirectories.

<p>Sub main()</p><p>  </p><p>    Set swApp = Application.SldWorks</p><p>         </p><p>    Const Path As String = "C:\\PDMWorks View\\Sub samenstellingen\\"</p><p></p><p></p><p>    sFileName = Dir(Path & "*.slddrw")</p><p>      </p><p></p><p></p><p>Dim doc         As SldWorks.ModelDoc2</p><p>Dim fileerror   As Long</p><p>Dim filewarning As Long</p><p></p><p></p><p>t = 0 'temporary</p><p></p><p></p><p>   </p><p>    Do Until sFileName = ""</p><p>    Set swApp = Application.SldWorks</p><p>    swApp.Visible = False</p><p>    Set doc = swApp.OpenDoc6(Path & sFileName, swDocDRAWING, 2, "", fileerror, filewarning)</p><p></p><p></p><p>    boolstatus = swApp.RunMacro2("D:\\Spare Part Generator\\Macro\\MARS RDC.swp", "RDC", "main", swRunMacroDefault, False)</p><p>    sFileName = Dir</p><p>    </p><p>    t = t + 1 'temporary</p><p>    If t > 10 Then Exit Do 'temporary</p><p></p><p>    </p><p>    </p><p>    Loop</p><p>    </p><p>  </p><p>End Sub</p>

This code works fine, but how can I modify this to also look in every subdirectory of that path?

SolidworksApi macros