Sorry Tatiana,
I should have mentioned.
Paste the code into a vb window, either as a module that you call from a command button, or the class module of the form.
Whilst viewing the vb code goto the tools menu, references, and tick the reference for microsoft Outlook.
J.