We discuss a microfluidic system in which (programmable) local electric fields originating from embedded and protected electrodes are used to control the formation and merging of droplets in a microchannel. The creation of droplets-on-demand (DOD) is implemented using the principle of electrowetting. Combined with hydrodynamic control, the droplet size and formation frequency can be varied independently. Using two synchronized DOD injectors, merging-on-demand (MOD) is achieved via electrocoalescence. The efficiency of MOD is 98% based on hundreds of observations. These two functionalities can be activated independently.