error de email
Publicado por Ernesto Ruiz (134 intervenciones) el 12/01/2007 01:37:27
señores, eh visto este codigo que a muchos les funciona, pero a mi no me funciona
esto lo tengo dentro de un init de mi form y lo corro y me sale un error:
OLE Error code 0x80004002: Interfaz no compatible
y el codigo que tengo es el siguiente:
strProfile = "nombredeusuarioperfil"
strPassword = "passwordperfil"
strRecipient = "[email protected]"
strSubject = "Asunto"
strBody = "Este es el mensaje..."
stradjunto= "c:\datos.xls" && indicar la ruta
theApp = CreateObject("Outlook.Application")
theNameSpace = theApp.GetNameSpace("MAPI")
theNameSpace.Logon(strProfile , strPassword)
theMailItem = theApp.CreateItem(0)
theMailItem.Recipients.Add( strRecipient )
theMailItem.Subject = strSubject
theMailItem.Body = strBody
theMailItem.attachments.Add (stradjunto) && lo adjunta al mail.
theMailItem.Send
theNameSpace.Logoff
alguien me podria ayudar con esto?
esto lo tengo dentro de un init de mi form y lo corro y me sale un error:
OLE Error code 0x80004002: Interfaz no compatible
y el codigo que tengo es el siguiente:
strProfile = "nombredeusuarioperfil"
strPassword = "passwordperfil"
strRecipient = "[email protected]"
strSubject = "Asunto"
strBody = "Este es el mensaje..."
stradjunto= "c:\datos.xls" && indicar la ruta
theApp = CreateObject("Outlook.Application")
theNameSpace = theApp.GetNameSpace("MAPI")
theNameSpace.Logon(strProfile , strPassword)
theMailItem = theApp.CreateItem(0)
theMailItem.Recipients.Add( strRecipient )
theMailItem.Subject = strSubject
theMailItem.Body = strBody
theMailItem.attachments.Add (stradjunto) && lo adjunta al mail.
theMailItem.Send
theNameSpace.Logoff
alguien me podria ayudar con esto?
Valora esta pregunta


0