Hello Proteus,
My immediate question is how are you creating the midi file? If you are using your keyboard and midi quick recording then I am sorry to say I don't know of any way you can automatically turn the VH on and off.
However if you are using software to create your midi file or can use software to modify your midi file then it is entirely possible. here's how:
You can send a sysex command inserted in a midi file to turn the VH on and off.
To turn the VH on, use the following sysex command: F0 43 10 4C 04 00 0C 40 F7
To turn the VH off, use the following sysex command: F0 43 10 4C 04 00 0C 7F F7
Save your midi file, play it back and enjoy automatic VH on and off.
Regards, Richard