AnsweredAssumed Answered

I get 'run-time error 80010108' in Office 365 Excel when executing OpenDoc6 a second time

Question asked by John Casey on Nov 30, 2017
Latest reply on Nov 30, 2017 by John Casey

Macro worked in Excel 2010, with SolidWorks 2009 API.  I am running the macro again in O365 Excel 2016, SW 2017.

 

Set swApp = CreateObject("SldWorks.Application")

sFileName = Dir(sPath & "\*.*")

Do While sFileName <> ""

Set swModel = swApp.OpenDoc6(sPath & "\" & sFileName, nDocType, 3, "", nErrors, nWarnings)

{processing}

swApp.QuitDoc (sPath & "\" & sFileName)

sFileName = Dir

Loop

 

The first SW file in the directory opens.  The second attempt at OpenDoc6 fails with "The object invoked has disconnected from its clients".  Continuing the script (F5/F8) results in "The remote server machine does not exist or is unavailable".

 

I've seen this posted in the past, but not with this configuration.  Any and all help is appreciated.

Outcomes