Is there a macro export model or drawing dimentions?

What I want to do is to create a macro to extract dimensions from the model or the drawing into an excel sheet that's already created. so as we change the model our excel sheet will update to the referenced dimensions in the drawing/ model? Can this be done? don't know a lot about macros

SolidworksDrawings And Detailing