|
Muchas gracias Elsa por tu ayuda, ya probé la instrucción que me informas pero sigue apareciendo el mensaje en Outlook.
Leí en un artículo de MS que el mensaje se puede deshabilitar si la fuente que consulta la lista de direcciones de correo es de confianza, pero no tengo idea de si se puede firmar la macro de excel como de confianza.
Te envío copia del script de la macro, quizás existe un mejor método contra el que estoy usando (en la linea marcada con negrita me envía el error):
Sub Range_Send_Email()
' Macro2 Macro
' Macro grabada el 11/07/2008 por jmartinez
Application.DisplayAlerts = False
Dim olApp As Outlook.Application
Dim lmail As Variant
Dim olNewMail As Outlook.MailItem
Dim olInspector As Outlook.Inspector
Dim olRecipient As Outlook.Recipient
Dim wdDoc As Word.Document
Dim wsSheet As Worksheet
Dim wbBook As Workbook
Dim rnData As Range
ActiveWindow.SmallScroll ToRight:=1
Selection.AutoFilter Field:=1, Criteria1:="=V", Operator:=xlOr, _
Criteria2:="=1"
ActiveWindow.ScrollColumn = 1
Set wbBook = ThisWorkbook
Set wsSheet = wbBook.Worksheets("Compromisos")
With wsSheet
Set rnData = .Range("A1:H87")
lmail = .Range("A64:A66")
End With
'Copy the range as a picture.
rnData.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
'Instantiate MS Outlook COM Objects.
Set olApp = New Outlook.Application
Set olNewMail = olApp.CreateItem(olMailItem)
Set olInspector = olNewMail.GetInspector
'Show the created e-mail to manipulate it via MS Word.
olInspector.Display
'Instantiate MS Word object.
Set wdDoc = olInspector.WordEditor
'Add the picture and text into the body:
With wdDoc.ActiveWindow.Selection
.TypeParagraph
.Paste
.TypeParagraph
.TypeParagraph
.Text = stMsg
End With
'Manipulate main properties of the created mailitem.
With olNewMail
For i = 1 To 3
Set olRecipient = .Recipients.Add(lmail(i, 1))
Next i
'.Recipients.Add ("jmartinez@cmpnet.com.mx")
.CC = "xy@cmpnet.com.mx; xx@cmpnet.com.mx; yy@cmpnet.com.mx"
.Subject = "Mensaje de Prueba Envío de Pendientes"
.Save
.Send
End With
Application.CutCopyMode = False
'Release objects from memory.
Set wdDoc = Nothing
Set olNewMail = Nothing
Set olApp = Nothing
End Sub
|