El Guru Programador
Usuario DESCONOCIDO | Registrate Gratis | Usuarios Registrados
Foro de Microsoft Access
Foros del Guru > Microsoft Access
 
Usuario EMAIL DESDE ACCESS. ¡VOY A VOLVERM...
Desconocido
Enviado - 11/6/2004
 
Tengo un problema en Access que, sinceramente, me esta volviendo loco. Explico:

Mantengo varios ordenadores que, aunque no los he instalado yo personalmente, se ha comprobado que TODOS tienen XP-Professional (la misma versión), Office 2000 (la misma versión), las mismas opciones de Internet en lo que a programa de correo se refiere (Outlook, etc). Vamos, que dicho de una forma coloquial: son "iguales". Bueno, pues en algunos funciona perfectamente la apertura de una sesión de correo desde Access, mientras que en otros insiste en: NO SE HA PODIDO ABRIR UNA SESION DE CORREO... ETC, ETC.

¿Que puede pasar aqui?. No entiendo nada de nada. Os agradeceria muchísmo que me aporteis alguna solución.

Gracias anticipadas.
 
tazfem
12 Mensaje(s)
Enviado - 23/7/2004
 
amigo yo tenia el mismo problema y lo solucione utilizando esta rutina que te voy a envia, eso si... comn Microsoft Outlock....

http://support.microsoft.com/newsgroups/default.aspx

Sending a Microsoft Outlook Mail Message Programmatically
Create a sample text file named Customers.txt in the C:\My Documents folder.
Start Microsoft Access, and open the sample database Northwind.mdb.
Create a module and type the following line in the Declarations section if it is not already there:Option Explicit

On the Tools menu, click References.
In the References box, click to select the Microsoft Outlook 9.0 Object Library, and then click OK.

NOTE: If the Microsoft Outlook 9.0 Object Library does not appear in the Available References box, browse your hard disk for the file, Msoutl9.olb. If you cannot locate this file, you must run the Microsoft Outlook Setup program to install it before you proceed with this example.
Type the following procedure in the new module:Sub SendMessage(Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Nancy Davolio")
objOutlookRecip.Type = olTo

' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
objOutlookRecip.Type = olCC

' Set the Subject, Body, and Importance of the message.
.Subject = "This is an Automation test with Microsoft Outlook"
.Body = "Last test - I promise." & vbCrLf & vbCrLf
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send

End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

To test this procedure, type the following line in the Immediate window, and then press ENTER: SendMessage "C:\My Documents\Customers.txt"

To send the message without specifying an attachment, omit the argument when calling the procedure, as follows:SendMessage

back to the top



REFERENCES
For more information about using Automation in Microsoft Access, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type "Automation" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
209963 How to Use Automation to Add Appointments to Microsoft Outlook

209955 How to Use Automation to Create a New Contact Item in Microsoft Outlook



back to the top





 
tazfem
12 Mensaje(s)
Enviado - 23/7/2004
 
amigo yo tenia el mismo problema y lo solucione utilizando esta rutina que te voy a envia, eso si... comn Microsoft Outlock....

http://support.microsoft.com/newsgroups/default.aspx

Sending a Microsoft Outlook Mail Message Programmatically
Create a sample text file named Customers.txt in the C:\My Documents folder.
Start Microsoft Access, and open the sample database Northwind.mdb.
Create a module and type the following line in the Declarations section if it is not already there:Option Explicit

On the Tools menu, click References.
In the References box, click to select the Microsoft Outlook 9.0 Object Library, and then click OK.

NOTE: If the Microsoft Outlook 9.0 Object Library does not appear in the Available References box, browse your hard disk for the file, Msoutl9.olb. If you cannot locate this file, you must run the Microsoft Outlook Setup program to install it before you proceed with this example.
Type the following procedure in the new module:Sub SendMessage(Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Nancy Davolio")
objOutlookRecip.Type = olTo

' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
objOutlookRecip.Type = olCC

' Set the Subject, Body, and Importance of the message.
.Subject = "This is an Automation test with Microsoft Outlook"
.Body = "Last test - I promise." & vbCrLf & vbCrLf
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send

End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

To test this procedure, type the following line in the Immediate window, and then press ENTER: SendMessage "C:\My Documents\Customers.txt"

To send the message without specifying an attachment, omit the argument when calling the procedure, as follows:SendMessage

back to the top



REFERENCES
For more information about using Automation in Microsoft Access, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type "Automation" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
209963 How to Use Automation to Add Appointments to Microsoft Outlook

209955 How to Use Automation to Create a New Contact Item in Microsoft Outlook



back to the top





 
 

 

Contactos myStudio Network