Corel draw Macro for turning a image into black and white

Hi,

I am trying to write a piece of code that is capable of turning an image into black and white in Corel. Is there some sort of method in order to achieve this?

I know how to do this manually, but I was trying to build a code that is capable of doing it. 

Steps I follow to do this manually are:

Bitmaps - Mode - Black and White.

Is there a method that would help me achieve this?