la macro envia a los usuarios de una columna a si en la b esta marcado
el yes y ademas en otra
celda (g3) el valor es 1 pero me da error "No es valido el valor de
configuracion sendusing" ALGUIEN PUEDE AYUDARME??? ME URGE!!!
pd: ya he pedido a mi proveedor de internet el smtp, nombre de
usuario(me ha extrañado que era mi propio correo), contraseña...
¿Puede ser que no tengo el Outlook express sino el normal?
Esta es la macro
Sub MacroX()
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
' Dim Flds As Variant
Application.ScreenUpdating = False
' Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
.Item("
http://schemas.microsoft.com/cdo/co...sing") = 2
'
.Item("
http://schemas.microsoft.com/cdo/co...rver") "mi smtp"
'
.Item("
http://schemas.microsoft.com/cdo/co...port")
= 25
' .Update
' End With
For Each cell In
Sheets("email").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Offset(0, 1).Value <> "" Then
If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0,
1).Value) = "yes" Then
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = cell.Value
.From = "y...@xxx.es"
.Subject = "INDICADOR A REVISAR"
.TextBody = "Las vacas de" & cell.Offset(0,
-1).Value
& vbNewLine & vbNewLine & _
"se han escapao"
' Set importance or Priority to high
.Fields("urn:schemas:httpmail:importance") = 2
.Fields("urn:schemas:mailheader:X-Priority") = 1
' Request read receipt
.Fields("urn:schemas:mailheader:return-receipt-to") "y...@xxx.es"
.Fields("urn:schemas:mailheader:disposition-notification-to")
"y...@ohr.es"
.Send
End With
Set iMsg = Nothing
End If
End If
Next cell
Set iConf = Nothing
Application.ScreenUpdating = True
End Sub
Leer las respuestas