not Get Freebusy

not Get Freebusy

Post by msnews.microsoft.co » Fri, 11 Jul 2003 19:52:32



I'm created com(.dll) by vb6 to cover CDOEX

Option Explicit

Dim cdoAddr As CDO.Addressee
Dim adsInfo As ActiveDs.ADSystemInfo

Public Function GetFreeBusyString(ByVal strUserUPN As String, ByVal
dtStartDate As Date, ByVal dtEndDate As Date, _
                           ByVal Interval As Integer) As String

    Set cdoAddr = New CDO.Addressee
    Set adsInfo = New ActiveDs.ADSystemInfo

    On Error Resume Next
    cdoAddr.EmailAddress = strUserUPN

    Dim strFreebusy As String

    If Not cdoAddr.CheckName("LDAP://" & adsInfo.DomainDNSName) Then
        strFreebusy = "Check name not found"
        GetFreeBusyString = strFreebusy
        Exit Function
    End If
    strFreebusy = cdoAddr.GetFreeBusy(dtStartDate, dtEndDate, Interval)
    GetFreeBusyString = strFreebusy

    Set cdoAddr = Nothing
    Set adsInfo = Nothing

End Function

I'm test on exchange server version 2000 two server
this one O.K get result success

but
part two return null but I resume next in code
__________________________________________________________________ nutt
srihajak ICQ#: 255512461 Current ICQ status: + More ways to contact me
__________________________________________________________________

 
 
 

not Get Freebusy

Post by msnews.microsoft.co » Wed, 16 Jul 2003 13:05:36


I'm created com(.dll) by vb6 to cover CDOEX

Option Explicit

Dim cdoAddr As CDO.Addressee
Dim adsInfo As ActiveDs.ADSystemInfo

Public Function GetFreeBusyString(ByVal strUserUPN As String, ByVal
dtStartDate As Date, ByVal dtEndDate As Date, _
                           ByVal Interval As Integer) As String

    Set cdoAddr = New CDO.Addressee
    Set adsInfo = New ActiveDs.ADSystemInfo

    On Error Resume Next
    cdoAddr.EmailAddress = strUserUPN

    Dim strFreebusy As String

    If Not cdoAddr.CheckName("LDAP://" & adsInfo.DomainDNSName) Then
        strFreebusy = "Check name not found"
        GetFreeBusyString = strFreebusy
        Exit Function
    End If
    strFreebusy = cdoAddr.GetFreeBusy(dtStartDate, dtEndDate, Interval)
    GetFreeBusyString = strFreebusy

    Set cdoAddr = Nothing
    Set adsInfo = Nothing

End Function

I'm test on exchange server version 2000 two server
this one O.K get result success

but
part two return null but I resume next in code

 
 
 

not Get Freebusy

Post by Dave Mill » Fri, 18 Jul 2003 01:45:16


If you turn off "on error resume next" then what error is thrown?  Also,
what are the parameters that are passed in?

- Dave


Quote:> I'm created com(.dll) by vb6 to cover CDOEX

> Option Explicit

> Dim cdoAddr As CDO.Addressee
> Dim adsInfo As ActiveDs.ADSystemInfo

> Public Function GetFreeBusyString(ByVal strUserUPN As String, ByVal
> dtStartDate As Date, ByVal dtEndDate As Date, _
>                            ByVal Interval As Integer) As String

>     Set cdoAddr = New CDO.Addressee
>     Set adsInfo = New ActiveDs.ADSystemInfo

>     On Error Resume Next
>     cdoAddr.EmailAddress = strUserUPN

>     Dim strFreebusy As String

>     If Not cdoAddr.CheckName("LDAP://" & adsInfo.DomainDNSName) Then
>         strFreebusy = "Check name not found"
>         GetFreeBusyString = strFreebusy
>         Exit Function
>     End If
>     strFreebusy = cdoAddr.GetFreeBusy(dtStartDate, dtEndDate, Interval)
>     GetFreeBusyString = strFreebusy

>     Set cdoAddr = Nothing
>     Set adsInfo = Nothing

> End Function

> I'm test on exchange server version 2000 two server
> this one O.K get result success

> but
> part two return null but I resume next in code