LeoBresser
Gebruiker
- Lid geworden
- 6 apr 2013
- Berichten
- 18
De vraag hoe kan is het lettertype aanpassen zodat deze vanuit de macro als Tahoma in de mail Outlook komt te staan.
Komt nu als Times New Roman terwijl de handtekening in Tahoma weergegeven wordt.
de handtekening mag ik vanwege protocol bedrijf niet aanpassen.
stukje van onderstaande VBA code is onderdeel van een groter geheel waarbij vanuit excel een rapportage incl foto's in PDF vorm wordt gemaakt en alles in een mail gezet wordt inclusief deze tekst en een persoonlijke handtekening
Als ik de code maakt via een HTML editor en code maak erin erin zet krijg ik compileer fout.
in ieder geval alvast bedankt
ik ben zover gekomen:
Dit staat in VBA
strbody = "<H3><B>Geachte heer mevrouw</B></H3>" & _
"PDF bestand is bijgevoegd<br>" & _
"hoe het lettertype te wijzigen is weet ik ff niet<br>" & _
"<br><br><B>Alvast bedankt</B>"
de totale code:
Function RDB_Mail_PDF_Outlook(FileNamePDF As String, StrTo As String, _
StrSubject As String, strbody As String, Send As Boolean)
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<H3><B>Geachte heer mevrouw</B></H3>" & _
" PDF bestand is bijgevoegd<br>" & _
" hoe het lettertype te wijzigen is weet ik ff niet<br>" & _
"<br><br><B>Alvast bedankt</B>" & _
" <br>"
SigString = Environ("appdata") & _
"\Microsoft\Signatures\Leo handtekening.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = StrTo
.CC = ""
.BCC = ""
.Subject = StrSubject
.htmlBody = strbody & Signature
.Attachments.Add FileNamePDF
If Send = True Then
.Send
Else
.display
End If
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Function
Komt nu als Times New Roman terwijl de handtekening in Tahoma weergegeven wordt.
de handtekening mag ik vanwege protocol bedrijf niet aanpassen.
stukje van onderstaande VBA code is onderdeel van een groter geheel waarbij vanuit excel een rapportage incl foto's in PDF vorm wordt gemaakt en alles in een mail gezet wordt inclusief deze tekst en een persoonlijke handtekening
Als ik de code maakt via een HTML editor en code maak erin erin zet krijg ik compileer fout.
in ieder geval alvast bedankt
ik ben zover gekomen:
Dit staat in VBA
strbody = "<H3><B>Geachte heer mevrouw</B></H3>" & _
"PDF bestand is bijgevoegd<br>" & _
"hoe het lettertype te wijzigen is weet ik ff niet<br>" & _
"<br><br><B>Alvast bedankt</B>"
de totale code:
Function RDB_Mail_PDF_Outlook(FileNamePDF As String, StrTo As String, _
StrSubject As String, strbody As String, Send As Boolean)
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<H3><B>Geachte heer mevrouw</B></H3>" & _
" PDF bestand is bijgevoegd<br>" & _
" hoe het lettertype te wijzigen is weet ik ff niet<br>" & _
"<br><br><B>Alvast bedankt</B>" & _
" <br>"
SigString = Environ("appdata") & _
"\Microsoft\Signatures\Leo handtekening.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = StrTo
.CC = ""
.BCC = ""
.Subject = StrSubject
.htmlBody = strbody & Signature
.Attachments.Add FileNamePDF
If Send = True Then
.Send
Else
.display
End If
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Function