I found one mistake in your code.
One double quotation was lacking.
command = SDDHOME & "\wv\win32\bin\icdbPartsLister.exe -prj=" & chr(34) & prjFilePath & chr(34) & " -board=" & boardName & " -cfg=" & chr(34) & WDIRPath & "\PartsLister\someiplfile.ipl" & chr(34) & " -out=" & chr(34) & prjPath & "\configuredBOM.xlsx" & chr(34)
I switched to using chr(34) to try and be less confusing for myself and yet I still managed to forget one. Good catch, I had been starring at that line of code for too long and just wasn't seeing the issue. Thank you for your time!
With Satoru-san's find the code started working as expected for projects on my local computer and would write the output in the appropriate location.
My company keeps all our projects on a network location and there is no garantee that the drive will be mapped. So likliness is that the output file will be a unc path. When I run the updated code on a project stored on the network, excel wants to write the file to my local User's Documents folder. Is this the expected behavior and/or are others experiencing this as well? Or am I doing something silly again? Thanks again in advance!
If I open the project through a mapped drive the excel output is written correctly to the network location.
If I open the project through a unc path the excel output will not write out to the specified network location.
1 of 1 people found this helpful
Hi Andrew, not saying it will work, but this is worth a try, it stop me getting errors on BoM creations etc from UNC paths :
Search for this and it's a regedit job:
Review Microsoft Knowledge Base Article - 156276 for a solution to this problem. You can use the instructions provided by Microsoft to allow the CMD.EXE console to deal with UNC paths correctly.
That's actually helpful on a few levels for me. Thanks for the pointer!