You can't "convert" that code. That code is specific to an ActiveX that Dymo made available for it's printers. What you need to do is send ZPL commands directly to the printer. You might see this thread in the Appeon forums where that is discussed...
Go to https://go.support.sap.com/minisap/#/minisapAnd then hit the link at the top of the page:I have not verified that it still works. I've long since moved on to the Appeon versions.https://www.appeon.com/products/powerbuilder