1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Sub Main()
' TODO: Replace the URL with your folder URL.
Dim sURL As String
sURL = "http://xxxxx/exchange/user/calendrier"
Dim oCn As ADODB.Connection = New ADODB.Connection()
oCn.Provider = "exoledb.datasource"
oCn.Open(sURL, "user", "password", 0)
If oCn.State = 1 Then
Console.WriteLine("Good Connection")
Console.ReadLine()
Else
Console.WriteLine("Bad Connection")
Console.ReadLine()
Return
End If
Dim oPerson As CDO.Person = New CDO.Person()
oPerson.Title = "Engineer"
oPerson.FirstName = "Joe"
oPerson.LastName = "Healy"
oPerson.Company = "Fabrikam, Inc."
oPerson.Email = "abc@fabrikam.com"
oPerson.FileAs = "Joe Healy"
oPerson.DataSource.SaveToContainer(sURL, , _
ADODB.ConnectModeEnum.adModeReadWrite, _
ADODB.RecordCreateOptionsEnum.adCreateNonCollection, _
ADODB.RecordOpenOptionsEnum.adOpenSource, _
"", "")
oCn.Close()
oPerson = Nothing
oCn = Nothing
End Sub |
Partager