Moderatori: Anthony47, Flash30005
Sono contento di vedere un codice pubblicato quasi 12anni fa ancora utilizzato, con gli stessi commenti...
- Codice: Seleziona tutto
GifLargh = Selection.Width + 10 '<<<AGGIUNTA
GifAlt = Selection.Height + 10 '<<<AGGIUNTA
'...
Sheets(MySheet).Activate
Range(MyArea).Select
'
'Blocco per salvare come Pdf:
OutFileb = "C:\Nutrizione\" & Nominat & "_Nutrizione.pdf"
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=OutFileb, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
'
GifLargh = Selection.Width + 10 '<<<AGGIUNTA
GifAlt = Selection.Height + 10 '<<<AGGIUNTA
'continua...
.Attachments.Add OutFile '<<< VEDI TESTO
.Attachments.Add OutFileb '<<<<<<<< questa!
.Display 'or use .send
Sub BaseMail()
Dim BDT As String, I As Long
'
Set OutApp = CreateObject("Outlook.Application")
'
'compilazione di un testo standard di accompagnamento
BDT = "<b>Buongiorno</b><br>Ti invio il risultato delle prove effettuate.<br>"
BDT = BDT & "Cordiali saluti <br>"
BDT = BDT & "<i>kiuba & kiss</i>"
'
' (b)
For I = 1 To 3
EmailAddr = Sheets("Foglio1").Cells(3 + I, 2).Value
Subj = "Invio risultati questionario"
'
Set OutMail = OutApp.CreateItem(0)
With OutMail
.to = EmailAddr
.CC = ""
.BCC = ""
.Subject = Subj
.htmlBody = BDT
'.Attachments.Add OutFile
.Display 'or use .send 'VEDI TESTO 1
'.send 'VEDI TESTO 2
End With
'
Application.Wait (Now + TimeValue("0:00:01"))
Set OutMail = Nothing
Next I
Set OutApp = Nothing
End Sub
Sub BaseImmagineInLinea()
Dim BDT As String, I As Long, OutAPP As Object
Dim InLineImg As String, PicName As String
'
Set OutAPP = CreateObject("Outlook.Application")
'
InLineImg = "D:\DImmagini\usptrick_sic.jpg" '<<< Full Path & Name
'
PicName = Mid(InLineImg, InStrRev(InLineImg, "\", , vbTextCompare) + 1)
'compilazione di un testo standard di accompagnamento
BDT = "<b>Buongiorno</b><br>Ti invio il risultato delle prove effettuate.<br>"
BDT = BDT & "Cordiali saluti <br>"
BDT = BDT & "<p></p><img src=""cid:" & PicName & """ width=200 height=150><br>"
BDT = BDT & "<p><i>kiuba & kiss</i></p>"
'
For I = 1 To 3
EmailAddr = Sheets("Foglio1").Cells(3 + I, 2).Value
Subj = "Invio risultati questionario "
'
Set OutMail = OutAPP.CreateItem(0)
With OutMail
.to = EmailAddr
.CC = ""
.BCC = ""
.Subject = Subj
.htmlBody = BDT
.Attachments.Add InLineImg
' .Display 'or use .send
.send
End With
'
Application.Wait (Now + TimeValue("0:00:01"))
Set OutMail = Nothing
Next I
Set OutAPP = Nothing
End Sub
'...
'compilazione di un testo standard di accompagnamento
BDT = "<b>Buongiorno</b><br>Ti invio il risultato delle prove effettuate.<br>"
BDT = BDT & "Cordiali saluti <br>"
BDT = BDT & "<p></p><img src=""cid:" & PicName & """ width=200 height=150><br>"
BDT = BDT & "<p><i>kiuba & kiss</i></p>"
BDT = BDT & RangePublish("Template", "B10:D20")
'
'...
gimart ha scritto:Ma non usi Photoshop? Se lo usi, la procedura è semplice: apri il file in Photoshop, scegli "Salva con nome" e quindi il formato pdf
kiuba ha scritto:gimart ha scritto:Ma non usi Photoshop? Se lo usi, la procedura è semplice: apri il file in Photoshop, scegli "Salva con nome" e quindi il formato pdf
Grazie per il suggerimento.
Purtroppo non è quello di cui ho bisogno. Sto cercando di salvare in automatico centinaia di immagini e allegarle alla mail corrispondente senza dover fare il lavoro a mano.
Mi era sfuggita questa richiesta...kiuba ha scritto:esiste funzione per inserire un grafico realizzato con excel in linea con il testo? Oppure devo creare l'immagine del grafico e poi inserirlo come immagine?
Sheets("NomeFoglio").ChartObjects(NomeGrafico).Chart.Export Filename:=OutFile, FilterName:="JPEG"
kiuba ha scritto:non ho ancora capito perchè l'immagine allegata venga diversa se aperta con outlook o con yahoo. Mi sembra un bel mistero che un allegato cambi forma in funzione del server
Torna a Applicazioni Office Windows
Inserire dati filtrati da 2 file ad un terzo file Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 14 |
Trasformare celle con formattazioni in html Autore: servicedynergy |
Forum: Applicazioni Office Windows Risposte: 5 |
File batch per copiare file selezionato da menu contestuale Autore: valle1975 |
Forum: Programmazione Risposte: 3 |
Visitano il forum: Nessuno e 51 ospiti