Envio de correo automatico
Publicado por Gonzalo (1 intervención) el 19/02/2003 20:56:36
Segun el codigo que les muestro aca logro llegar hasta la bandeja de salida pero no logro que lo envie solo, ya que tengo que hacer que lo envie apenas aprete el boton.
De antemano molte gratzie....
Saludos.
Gonzalo.
--------------------------------------------------------------------------------------------
Private Sub Command1_Click()
' Start Outlook.
' If it is already running, you'll use the same instance...
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
' Logon. Doesn't hurt if you are already running and logged on...
Dim olNs As Outlook.NameSpace
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon
' Create and Open a new contact.
' Dim olItem As Outlook.ContactItem
' Set olItem = olApp.CreateItem(olContactItem)
' Setup Contact information...
' With olItem
' .FullName = "James Smith"
' .Birthday = "9/15/1975"
' .CompanyName = "Microsoft"
' .HomeTelephoneNumber = "704-555-8888"
' .Email1Address = "[email protected]"
' .JobTitle = "Developer"
' .HomeAddress = "111 Main St." & vbCr & "Charlotte, NC 28226"
' End With
' Save Contact...
' olItem.Save
' Create a new appointment.
' Dim olAppt As Outlook.AppointmentItem
' Set olAppt = olApp.CreateItem(olAppointmentItem)
' Set start time for 2-minutes from now...
' olAppt.Start = Now() + 2 ( 2# / 24# / 60#)
' Setup other
De antemano molte gratzie....
Saludos.
Gonzalo.
--------------------------------------------------------------------------------------------
Private Sub Command1_Click()
' Start Outlook.
' If it is already running, you'll use the same instance...
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
' Logon. Doesn't hurt if you are already running and logged on...
Dim olNs As Outlook.NameSpace
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon
' Create and Open a new contact.
' Dim olItem As Outlook.ContactItem
' Set olItem = olApp.CreateItem(olContactItem)
' Setup Contact information...
' With olItem
' .FullName = "James Smith"
' .Birthday = "9/15/1975"
' .CompanyName = "Microsoft"
' .HomeTelephoneNumber = "704-555-8888"
' .Email1Address = "[email protected]"
' .JobTitle = "Developer"
' .HomeAddress = "111 Main St." & vbCr & "Charlotte, NC 28226"
' End With
' Save Contact...
' olItem.Save
' Create a new appointment.
' Dim olAppt As Outlook.AppointmentItem
' Set olAppt = olApp.CreateItem(olAppointmentItem)
' Set start time for 2-minutes from now...
' olAppt.Start = Now() + 2 ( 2# / 24# / 60#)
' Setup other
Valora esta pregunta


0