You just need to set the ActivePrinter to make this work:
set property of gs_word 'ActivePrinter' = 'PrinterName'.
Add this line, before the PrintOut command.
Edit: If you want user to have the option to choose the printer, then you can give a popup with a dropdown of printer names. List of printer names can be retrieved using RSPO_LIST_FRONTEND_PRINTERS function module. Check RSPO_FRONTEND_PRINTERS_FOR_DEV for example. Once the user chooses the printer from the dropdown, pass that selected value to the ActivePrinter name.
Thanks,
Juwin
Message was edited by: Juwin Pallipat Thomas