Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA: Lettertype in outlook bericht instellen

116 views
Skip to first unread message

ROn van der Nagel

unread,
Jan 18, 2006, 5:00:47 PM1/18/06
to
Moeilijke vraag (gok ik).

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/

msn_zld

unread,
Jan 19, 2006, 11:03:35 AM1/19/06
to

ROn van der Nagel schreef:

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

0 new messages