MiyagiZama
New Member
- Joined
- Jul 26, 2023
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
Hello mates, I have a question for my code, due to the next pop up appears when I tried to send an email, I saw in a thread in this blog with the same issue but, unfortunately in my company exist a lot of boundaries for Cibber security and I cant to press the send bottom in my macro without pop up appears
I used MailEnvelope atribute
Could you assist to me please how can I can fix this
Here's the VBA code
I used MailEnvelope atribute
Could you assist to me please how can I can fix this
Here's the VBA code
VBA Code:
Sub SENDEMAIL()
'
'DECLARAMOS VARIABLES
'
Dim Destinatarios As String
Dim shUSA As Worksheet
'
'
Set sh = Sheets("USA")
'
shUSA.Activate
Columns("A:A").Select
With Selection
.HorizontalAlignment = xlLeft
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
'
'
'
ActiveSheet.Rows("1:12").Insert
'
'
Range("A1").Value = "Apreciables colegas, espero que se encuentren excelente el dia de hoy."
Range("A3").Value = "El motivo del siguiente correo es para pedir su apoyo con la colocacion de las siguientes Ordenes de Compra "
Range("A5").Value = " Quedamos al pendiente de su futura respuesta "
Range("A10").Value = "Atentmente"
Range("A11").Value = "Departamento de Compras"
Range("A1:A10").Font.Size = 16
Range("A10").Font.Bold = True
'
'
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = "XXXXXX@GMAIL.COM"
.Item.Subject = "CONFIMATION"
.Item.Send
End With
'
'
shUSA.Columns("A:G").Delete
ActiveWorkbook.EnvelopeVisible = False
End Sub