Bom dia, tenho uma macro que envia corretamente emails em bloco de 99 emails. Porem o Gmail identifica isso como Span. Porem nao é pois envio as Lojas as quais mantenho contato.
EM algum lugar eu vi que para isso nao ocorrer eu nao poderia enviar nem por C/C e nem por CCo. Porem eu gostaria de enviar por CCo e isso causa o retorno de erro. 
Entao acho ser a unica forma de fazer os envios seria um a um mesmo, mas para isso eu precisaria de uma Macro que funcionasse por LOOP, assim sendo poderia individualizar no assunto.
Como a Macro abaixo funciona corretamente em certo grupo de envio em uma de minhas contas de envio e nao funciona em outra conta Gmail.
eu queria entao desta forma adaptar na macro em questao, uma cadeia de comandos com este objetivo. Funcionaria assim:
Se a Celula Q22 estiver com o numeral ( 1 ) , entao a regra de envio sera a de loop enviando email por email em separado. Se a Celula Q22 estiver vazia, entao seguira normalmente a Macro em questao abaixo. Poderiamos para isso usar o GOTO e iniciar a Macro no final desta abaixo.
A pasta que estao os emails se chama ( EN ), e o o primeiro Email se inicia na :
celula G2 e o ultimo esta na Celula G99 Depois tem outra sequencia na
Celula I2 e o ultimo esta na Celula I99 depois tem outra sequencia na
Celula K2 e o ultimo esta na celula K99 .........
Celula M2 ......
Celula O2 .......
Celula Q2 ....
e assim vai ate a celula AG2 ate AG 99
Agradeço a todos que mais uma vez puderem me dar uma ajudinha.
André
Sub X_Lojas_Convites()
'  Enviar Convites Lojas
If Range("E11") = "" Then
Run "Copiar1"
GoTo Segue
Else
If Range("F11") = "" Then
Run "Copiar2"
Else
If Range("G11") = "" Then
Run "Copiar3"
Else
If Range("H11") = "" Then
Run "Copiar4"
Else
If Range("I11") = "" Then
Run "Copiar5"
Else
If Range("E12") = "" Then
Run "Copiar6"
Else
If Range("F12") = "" Then
Run "Copiar7"
Else
If Range("G12") = "" Then
Run "Copiar8"
Else
If Range("H12") = "" Then
Run "Copiar9"
Else
If Range("I12") = "" Then
Run "Copiar10"
Else
If Range("E13") = "" Then
Run "Copiar11"
Else
If Range("F13") = "" Then
Run "Copiar12"
Else
If Range("G13") = "" Then
Run "Copiar13"
Else
If Range("H13") = "" Then
Run "Copiar14"
 Else
   Run "Copiar1"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
GoTo Segue
Segue:
'If Worksheets("EN").Range("C1").Value = "" Then
'MsgBox ("Não foi copiado os E-mails para serem enviados !")
'Sheets("EN").Visible = True
'' GoTo Fim
  '       Else
   '           End If
'Setting up the Excel variables.
    Dim OlApp As Outlook.Application
    Dim OlMensagem As Outlook.MailItem
    Dim iCounter    As Integer
    Dim Dest        As Variant
    Dim SDest       As String
    Dim Estado      As String
    Dim BuscaEstado As Range
    Dim AbrevEstado As String
    Dim Leitura     As String
    Dim contaEmail As String
    Dim idEmail As Integer
    Dim strbody As String
    Dim Loja        As String
    Loja = Range("A1")
    
    If Range("K4") = 1 Then
    
strbody = "<H2>" & _
        Sheets("Enviar Convites").Range("V2").Value & _
        "</H2>" & _
        "<H3 style='color: #870c0c'>" & _
        Sheets("Enviar Convites").Range("V6").Value & _
        "</H3>" & _
        "<H3>" & _
        Sheets("Enviar Convites").Range("V10").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("V14").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z18").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z22").Value & _
        "<br><br>" & _
        "<br><br><B>Obrigado por ser nosso parceiro, conte comigo!!</B>" & _
        "<br><br>"
    
GoTo Saltar
    
    Else
    End If
strbody = "<H2>" & _
        Sheets("Enviar Convites").Range("Z2").Value & _
        "</H2>" & _
        "<H3 style='color: #870c0c'>" & _
        Sheets("Enviar Convites").Range("Z6").Value & _
        "</H3>" & _
        "<H3>" & _
        Sheets("Enviar Convites").Range("Z10").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z14").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z18").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z22").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z23").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z24").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z25").Value & _
        "<br><br>" & _
        Sheets("Enviar Convites").Range("Z26").Value & _
        "</H3>" & _
        "<br><br><B>Obrigado por ser nosso parceiro, conte comigo!!</B>" & _
        "<br><br>"
GoTo Saltar
Saltar:
    Leitura = Sheets(Loja).Range("I7")
    Estado = Application.Caller
    Application.ScreenUpdating = False
    Sheets(Estado).Visible = True
 Application.DisplayAlerts = False 'desabilite o alerta
        Range("L2").Select
    Set BuscaEstado = ThisWorkbook.ActiveSheet.Range("A3:A8").Find(Estado, LookIn:=xlValues, LookAt:=xlWhole)
    
    If BuscaEstado Is Nothing Then
        MsgBox "Estado não localizado"
        GoTo Fim
    Else
    
        AbrevEstado = ThisWorkbook.Worksheets(Loja).Cells(BuscaEstado.Row, 1).Value
    End If
    
' Preste atencao aqui
      contaEmail = ThisWorkbook.Sheets(Loja).Range("I8").Value
    
    'Quero que aqui, ao inves de ter RJ tenha a variavel Estado que vai estar associado ao click na     regiao do mapa.
    ThisWorkbook.Worksheets(AbrevEstado).Select
   
    iCounter = 2 'inicia na linha 2
   
    'Create the Outlook application and the empty email.
    Set OlApp = CreateObject("Outlook.Application")
Set OlMensagem = OlApp.CreateItem(0)
'------------------------------------------------------------------------------
   
   'Este laço verifica se o nome da conta w no registro do windows é igual ao valor da célula
    For w = 1 To OlApp.Session.Accounts.Count
        If OlApp.Session.Accounts.Item(w).DisplayName = contaEmail Then 'Se for verdadeiro, solicita confirmação
            If MsgBox("O E-mail será enviado usando a conta " & contaEmail & ". Confirma ?" & "    ( Estado - " & Estado & " )", vbQuestion + vbYesNo, "Envio de e-mail") = vbYes Then
                            
                idEmail = w 'Define o id da conta para o comando enviar
                Exit For 'Sai do laço
                
            Else
                 Sheets(Estado).Visible = False
                 Sheets(Loja).Select
                
                GoTo Fim 'Senão sai da rotina
            End If
        End If
    Next
'-------------------------------------------------------------------------------
'Using the email, add multiple recipients, using a list of addresses in column C.
     With OlMensagem
       For iCounter = 2 To WorksheetFunction.CountA(Columns(3))  ' Linha 2 da coluna 3
       
       ' Sheets("Email").Select
               SDest = SDest & ";" & Cells(iCounter, 3).Value
       Next iCounter
          
'     Sheets("parar").Select
     
          
    'Do additional formatting on the BCC and Subject lines, add the body text from the spreadsheet, and send.
       .Display
       
If Sheets("Enviar Convites").Range("Q15").Value = 1 Then
       
       .BCC = SDest
       
Else
       
       .To = SDest
       
 End If
 
If Sheets("Enviar Convites").Range("K4").Value = 1 Then
  
       .Subject = "Tabela de Pedidos da Gauer do Brasil"
       
Else
       .Subject = "Tabela de Pedidos da Leader Nutrition"
       
End If
       
       .HTMLBody = strbody & "<br>" & .HTMLBody
       
If Sheets(Loja).Range("F1").Value > 0 Then
       .Attachments.Add "C:UsersAndreDesktopPedidos Gauer" & Sheets(Loja).Range("F1").Value & Sheets(Loja).Range("I1").Value
Else
    End If
If Sheets(Loja).Range("F2").Value > 0 Then
       .Attachments.Add "C:UsersAndreDesktopPedidos Gauer" & Sheets(Loja).Range("F2").Value & Sheets(Loja).Range("I2").Value
Else
    End If
If Sheets(Loja).Range("F3").Value > 0 Then
       .Attachments.Add "C:UsersAndreDesktopPedidos Gauer" & Sheets(Loja).Range("F3").Value & Sheets(Loja).Range("I3").Value
Else
    End If
If Sheets(Loja).Range("F4").Value > 0 Then
       .Attachments.Add "C:UsersAndreDesktopPedidos Gauer" & Sheets(Loja).Range("F4").Value & Sheets(Loja).Range("I3").Value
Else
    End If
       
       
If Sheets(Loja).Range("I6").Value = "SEND" Then
       .ReadReceiptRequested = Leitura ' confirmação de leitura
       .SendUsingAccount = OlApp.Session.Accounts.Item(idEmail)
       .Send
Else
       .ReadReceiptRequested = Leitura ' confirmação de leitura
       .SendUsingAccount = OlApp.Session.Accounts.Item(idEmail)
       .Display
        
End If
Sheets("EN").Select
' Limpar Email Planilha EN ( Enviar Convites )
    Sheets("EN").Range("C1:C99").Select
    Selection.ClearContents
    Range("D1").Select
Sheets(Loja).Select
If Range("K12").Value = 105 Then
    Range("E11:I13").Select
    Selection.ClearContents
    
Else
End If
Sheets(Estado).Visible = False
   
GoTo Fim
   End With
    Exit Sub
Fim:
   'Clean up the Outlook application.
   Set BuscaEstado = Nothing
   Set OlMensagem = Nothing
   Set OlApp = Nothing
   
End Sub
                                                                                                	                                                
	                                         
                    
                    	
                            Postado : 15/04/2016 7:54 am