Using OLE with Perl may help.
In reply to Re: how to convert this VB code to perl by gone2015 in thread how to convert this VB code to perl by proton-69