How to combine functionalities of two marcos?

Hi,

I found here two marcos that i would like to combine. The first one is looping through the folder and re-building configurations. The other one is lowering image quality. How to set up the quality when the files are opened and rebuild?

Credits: Billy WightJoyce Bossom

Thanks

SolidworksApi/macros