How to replace document and specify configuration

I want at replacing a reference using ReplaceReferencedDocument to specify also the configuration. Is that possibile?

Thanks

SolidworksApi macros