locked
Cannot use JScript Date() with RecurrencePattern.GetOccurrence(StartDate) of Outlook 2007 RRS feed

  • Question

  • Cannot use JScript Date() with RecurrencePattern.GetOccurrence(StartDate) of Outlook 2007.

    In JScript 5.6 I tried using a Date() object and string and GetOccurrence() does not accept neither.
    var rightNow = new Date( 2008, 11, 26, 15, 16, 00);
    var rpItem = rp.GetOccurrence(rightNow);



    I also tried the following in JScript 8.0

    var rightNow : Date = new Date( 2008, 11, 26, 15, 16, 00);
    var rpItem = rp.GetOccurrence(rightNow);


    here's the exception I am getting:

    Unhandled Exception: System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. (Exception from HRESULT: 0
    x80020005 (DISP_E_TYPEMISMATCH))
    at Microsoft.JScript.LateBinding.Call(Object[] arguments, Boolean construct, Boolean brackets, VsaEngine engine)
    at JScript 0.GetOutloookAppointments(Object this, VsaEngine vsa Engine) in t002.js:line 89
    at JScript 0.Global Code() in t002.js:line 61
    at JScript Main.Main(String[] )

    Still failing.

    What kind of date does GetOccurence take?


    Thanks,

    //Agron



    Friday, November 28, 2008 7:54 PM

All replies

  • Lets just concentrate ong the JScript 5.6 version since its easier to test.  Are you getting a Type Mismatch error when using that?

     

    That would be strange, the parameter to GetOccurance is a simple [In] VT_DATE for which JScript will simply convert the value for a Date object to when calling.  You are sure that the date represents an actual appointment?  16 minutes past the hour seems like an odd choice for an appointment time.

     

     

    Tuesday, December 2, 2008 1:54 PM