Write a SOLIDWORKS VBA macro for SOLIDWORKS 2024 that finds the first bill of materials table in the active drawing and writes it to a CSV file next to the drawing, with the column headers as the first row, exactly as the table shows them, including hidden rows excluded. Stop with a clear message if there is no drawing open or no BOM table in it. Use early binding and check every return value. Give me only the complete macro and one sentence on how to run it.
