I have only used open office a couple times so I can't give you a way to stop openoffice viruses on openoffice but I can tell you how to stop VBA for Microsoft Word and how to stop Basic scripts on LibreOffice, its down below: An alternative to openoffice is LibreOffice that is a openoffice derivative that is a lot more popular, more fetures and is also free. OpenOffice will be a lot safer if you need to use macro's to speed things up but if you don't use macros then Office can be just as safe.
Open office doesn't run VBA scripts so VBA viruses wont work, but OpenOffice has BASIC, that is OpenOffices own version of VBA, that will have a lot less viruses but will still have Viruses.