Condividi:        

Macro testo mail con tabelle

Risolvi qui i tuoi problemi legati a Windows '95, '98, ME, NT, 2000, XP, 2003, Vista...

Moderatori: m.paolo, antoo69, -> EleKtrA <-

Macro testo mail con tabelle

Postdi tav » 03/08/18 22:16

Ciao a tutti
Chi mi può aiutare? Volevo sapere come poter inserire in un resto di mail un foglio Excel al chi interno ci sono delle tabelle ( vorrei mantenere anche il formato)
tav
Utente Junior
 
Post: 46
Iscritto il: 08/04/18 20:57

Sponsor
 

Re: Macro testo mail con tabelle

Postdi tav » 03/08/18 22:41

https://wetransfer.com/downloads/f12c4e039a0ee7b3645928d492d3931320180803212539/6e0f8d72c63dd367f350608036d801d020180803212539/10d490

questo è il codice che ho fatto, ma non mi mette nulla nel testo

Codice: Seleziona tutto
Function All_Adr(ByRef CollAdd As Range) As String
Dim oCell As Range, eAdr
'
For Each oCell In CollAdd
    If oCell <> "" Then
        eAdr = eAdr & "; " & oCell
    Else
        Exit For
    End If
Next oCell
All_Adr = Mid(eAdr, 3)
End Function



Codice: Seleziona tutto
Dim OutApp As Object, OutMail As Object

'



'Creazione mail:





Set OutApp = CreateObject("Outlook.Application")


Subj = "Rilavorazione " & " " & Format(Now + 1, "dd-mm-yy")                    '<<< OGGETTO DELLA MAIL
Set OutMail = OutApp.CreateItem(0)
With OutMail
    Sheets("Testo").Visible = True
    .body = All_Adr(Sheets("Testo").Range("A1:A200"))
   
       
   
   
    Sheets("Testo").Visible = False
   
   
   


   
   
   



   

   
   

 
   
   
    .to =
    .CC =                                             '<<<
    '.BCC =                       '<<<
    .Subject = Subj
    '.Attachments.Add Environ("Temp") & "\SIM.xlsx"
    .display
End With
Set OutMail = Nothing
Set OutApp = Nothing
'


End Sub

tav
Utente Junior
 
Post: 46
Iscritto il: 08/04/18 20:57

Re: Macro testo mail con tabelle

Postdi tav » 04/08/18 05:44

vorrei eliminare il post perché mi sono accorto di averlo inserito nella sezione errata, ma non riesco
tav
Utente Junior
 
Post: 46
Iscritto il: 08/04/18 20:57


Torna a Sistemi Operativi Windows


Topic correlati a "Macro testo mail con tabelle":


Chi c’è in linea

Visitano il forum: Nessuno e 40 ospiti