Thema Datum  Von Nutzer Rating
Antwort
29.10.2020 07:51:49 ch79
NotSolved
29.10.2020 08:30:35 TestGast
NotSolved
29.10.2020 12:22:48 volti
NotSolved
29.10.2020 12:32:44 volti
NotSolved
30.10.2020 14:08:05 Gast83026
NotSolved
30.10.2020 17:46:32 volti
NotSolved
30.10.2020 17:48:41 volti
NotSolved
30.10.2020 21:03:09 ch79
NotSolved
Rot Body Format
03.11.2020 11:28:35 ch79
NotSolved
03.11.2020 13:27:01 volti
NotSolved
03.11.2020 15:32:08 Gast47610
NotSolved
03.11.2020 16:12:31 volti
NotSolved
03.11.2020 17:33:46 Mase
NotSolved
03.11.2020 17:45:27 Mase
NotSolved
03.11.2020 19:31:10 volti
NotSolved
03.11.2020 19:57:37 Mase
NotSolved
03.11.2020 22:15:13 volti
NotSolved
03.11.2020 23:19:31 Mase
NotSolved

Ansicht des Beitrags:
Von:
ch79
Datum:
03.11.2020 11:28:35
Views:
543
Rating: Antwort:
  Ja
Thema:
Body Format

Hallo Karl-Heinz

Wieso geht das mit der Schriftgrösse beim untenstehenden Makro nicht? Wird immer noch klein im E-Mail dargestellt.

Sub Mail_Senden()
'Sendet Mail mit integriertem Bereich als Bild mit Signatur
'Das Bild wird über das Kürzel ~ im Text platziert
 Dim WSh As Worksheet, WkS As Worksheet
 Dim sMailtext As String, sBild As String, sSignatur As String
 Dim sBer As String, iEinf As Integer
  
 sBer = "A20:K33"                           'Kopierbereich
 Set WSh = ThisWorkbook.Sheets("Transport")  'Blatt mit Maildaten
 On Error Resume Next
  
'Bereich kopieren
 Do
  WSh.Range(sBer).CopyPicture Appearance:=xlScreen, Format:=xlBitmap
   If Err.Number = 0 Then Exit Do
   Err.Clear
 Loop
  
 With CreateObject("Outlook.Application").CreateItem(0)
  .BodyFormat = 2                           'HTML-Format, Angabe optional
  .Subject = "Crate and Weight Size " & WSh.Range("F20").Value       'Betreff
  .To = "test@mail.com"                      'Empfänger
   sMailtext = "Hi ," & vbLf & vbLf & "Crate and weight size for " _
             & WSh.Range("F20").Value & ":" & vbLf & vbLf
  .GetInspector:  sSignatur = .HTMLBody     'Signatur holen
  .HTMLBody = "<span style='font-family:Calibri;font-size:11.5pt;color:black;'>" _
          & Replace(sMailtext, vbLf, "<br>") & "</span>" & sSignatur
  .Display
 
  iEinf = Len(sMailtext) - 1                  'Grafik Einfügestelle
   
  With .GetInspector.WordEditor.Application.Selection
       .Start = iEinf: .End = iEinf
       .Paste                               'Grafik in Mail einfügen
  End With
  
 End With
 
End Sub
 
 
 
Sub Mail_TransportBestellungSenden_mit_PDF()
'Sendet Mail mit integriertem Bereich als Bild mit Signatur
'Das Bild wird über das Kürzel ~ im Text platziert
 Dim WSh As Worksheet
 Dim sMailtext As String, sSignatur As String
 Dim sDateiName As String, T As String
    
'<<<Tabellenblatt anpassen>>>
 Set WSh = ThisWorkbook.Sheets("Transport")  'Blatt mit Maildaten
  
 sDateiName = ThisWorkbook.FullName
 sDateiName = Left$(sDateiName, InStrRev(sDateiName, ".")) & "pdf"
 T = ThisWorkbook.Path & "\"
 sDateiName = Replace(sDateiName, T, T)
 'sDateiName = Replace(sDateiName, T, T & WSh.Range("F20").Value & "_")
 
'<<<Tabellenblatt anpassen>>>
 ThisWorkbook.Sheets("Transport").ExportAsFixedFormat Type:=xlTypePDF, _
     Filename:=sDateiName, Quality:=xlQualityStandard, _
     IncludeDocProperties:=True, _
     IgnorePrintAreas:=False, OpenAfterPublish:=True
    
 With CreateObject("Outlook.Application").CreateItem(0)
  .BodyFormat = 2                                   'HTML-Format, Angabe optional
  .Subject = "Transportbestellung " & WSh.Range("F20").Value  'Betreff
  .To = Replace(WSh.Range("G8").Value, vbLf, ";")   'Empfänger
   sMailtext = "Guten Tag," & vbLf & vbLf & "Im Anhang sende ich Ihnen die Transportbestellung für den Auftrag " _
             & WSh.Range("F20").Value & "." & vbLf & vbLf & "Gerne erwarte ich Ihre Bestätigung mit dem genauen Abholtermin."
  .GetInspector:  sSignatur = .HTMLBody             'Signatur holen
  .HTMLBody = "<span style='font-family:Calibri;font-size:11.5pt;color:black;'>" _
          & Replace(sMailtext, vbLf, "<br>") & "</span>" & sSignatur
   .Display
 
'Anlage anfügen
  If Dir$(sDateiName) <> "" Then
     .Attachments.Add sDateiName                    'Anlage anfügen
  End If
    
 End With
   
End Sub
 
Ist da noch ein Fehler drin?
 
Gruss
ch79

Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
29.10.2020 07:51:49 ch79
NotSolved
29.10.2020 08:30:35 TestGast
NotSolved
29.10.2020 12:22:48 volti
NotSolved
29.10.2020 12:32:44 volti
NotSolved
30.10.2020 14:08:05 Gast83026
NotSolved
30.10.2020 17:46:32 volti
NotSolved
30.10.2020 17:48:41 volti
NotSolved
30.10.2020 21:03:09 ch79
NotSolved
Rot Body Format
03.11.2020 11:28:35 ch79
NotSolved
03.11.2020 13:27:01 volti
NotSolved
03.11.2020 15:32:08 Gast47610
NotSolved
03.11.2020 16:12:31 volti
NotSolved
03.11.2020 17:33:46 Mase
NotSolved
03.11.2020 17:45:27 Mase
NotSolved
03.11.2020 19:31:10 volti
NotSolved
03.11.2020 19:57:37 Mase
NotSolved
03.11.2020 22:15:13 volti
NotSolved
03.11.2020 23:19:31 Mase
NotSolved