In Excel heb ik een macro aangemaakt waarin een e-mail bericht wordt
aangemaakt. Hoe kan ik opgeven dat dit bericht in RTF (HTML) formaat moet
zijn en wat het lettertype moet zijn?
Iemand enig idee?
Gr. ROn...
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Misschien heb je wat aan dit voorbeeld:
Sub OutlookMailVerzenden(Onderwerp, Ontvanger, hLink, hLinkNaam,
Bericht, Belangrijk, Verzender)
Dim bStarted As Boolean
Dim oOutlookApp As Object
Dim oItem As Object
Set oOutlookApp = CreateObject("Outlook.Application")
Set oItem = oOutlookApp.CreateItem(olMailItem)
On Error Resume Next
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.BodyFormat = olFormatHTML
.Importance = Belangrijk
.To = Ontvanger
.Subject = Onderwerp
.HTMLBody = "<a href=" & hLink & ">" & hLinkNaam & "</a><br><br>"
.HTMLBody = .HTMLBody & "<HTML> <FONT FACE='Arial' size ='2' >" &
Bericht & "<br><br></HTML>"
.HTMLBody = .HTMLBody & "<HTML>" & Verzender & "<br><br></HTML>"
.HTMLBody = .HTMLBody & "<HTML>Dit bericht is automatisch
verzonden.</FONT></HTML>"
.DeleteAfterSubmit = True
.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
msn