Macro to Collect Area Moment of Inertia and Save to Text file

Hi All
I need help. I have a shaft of various cross sectional profiles and I need to get the area moment of inertia at various points along it. I want to get the xx and yy MOIs and save them to an separate text file.
I'm new to VBA for Solidworks, but have a fair bit of experience with Solidworks itself.
Any ideas?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.