Hi everyone,

I need to convert the code below to javascript. I'm close except I have problems with the olMailItem part. See both sample below. Any help would be great.
thx


VB Code:
  1. Sub btnEmail(subject, tofield, body)
  2.        
  3.             Set myOlApp = CreateObject("Outlook.Application")
  4.             Set myOlExp = myOlApp.ActiveExplorer
  5.             Set myItem = myOlApp.CreateItem(olMailItem)
  6.             myItem.Subject = subject
  7.  
  8.             myItem.Body = body
  9.             myItem.To = tofield
  10.             myOLExp.Activate
  11.             MyItem.Display
  12.            
  13.         End Sub


Code:
function btnEmailJava(subject, tofield, body)
{

var myOlApp = new ActiveXObject("Outlook.Application");
var myOlExp = myOlApp.ActiveExplorer;
			var myItem = ??????;
			myItem.Subject = subject;

			myItem.Body = body;
			myItem.To = tofield;
			myOLExp.Activate;
			MyItem.Display;
}