Help me please with this issue, pop up appears

MiyagiZama

New Member
Joined
Jul 26, 2023
Messages
18
Office Version
  1. 365
Platform
  1. 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

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
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
What is the pop up you are referring to?
This is the pop up, and I want to press "Allow" with a code, but I dont know how to write this sentence in VBA ... Could you assist to me please?
 

Attachments

  • 1695320812259.png
    1695320812259.png
    19.7 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top