
29/03/2005, 11:08
|
| | Fecha de Ingreso: diciembre-2004
Mensajes: 50
Antigüedad: 20 años, 2 meses Puntos: 0 | |
Hola Rootk, gracias por contestar...agregue el logon, pero me sigue enviando el mismo error...no soy muy experta en esto, y he estado investigando en internet..pero solo aparece el error pero no la solucion y no se que estoy haciendo mal. Alli t envio el codigo...para simplificar solo le agregue unas labels solo para verificar si me traina el resultado...pero todavia me aparece acceso no autorizado.
Dim miOutlook As Outlook.Application = New Outlook.Application
Dim miNameSpace As Outlook.NameSpace = miOutlook.GetNamespace("MAPI")
Dim oContactos As Outlook.MAPIFolder = miNameSpace.GetDefaultFolder(Outlook.OlDefaultFold ers.olFolderContacts)
'** Dim Profile As String = "netserver.evolusoft.hq" & " " & "Dayana Contreras"
' miNameSpace.Logon("usuario", "password", Nothing, Nothing)
miNameSpace.Logon("dayana", "lokita", Nothing, Nothing)
Dim oItems As Outlook.Items = oContactos.Items
Dim oCt As Outlook.ContactItem
Dim iCount As Integer
iCount = 0
oCt = CType(oItems.GetFirst(), Outlook.ContactItem)
'***---***
Label1.Text = oCt.FullName
Label2.Text = oCt.Email1Address
'***---***
Do While Not oCt Is Nothing
iCount += 1
Loop
Label3.Text = iCount.ToString
miOutlook = Nothing
oItems = Nothing
oCt = Nothing
gracias |