• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Makro ile mail göndermede Body kısmının düzenlenmesi.

Katılım
14 Kasım 2006
Mesajlar
80
Excel Vers. ve Dili
2002
Merhabalar;
Aşağıdaki makro çalıştığında .htmlbody kısmındaki "Bilgilerine..." yazısının yazıkarakteri türü times new roman olarak geliyor. Ben bunun calibri olmasıni istiyorum. Ama başaramadım. Yardımlarınızı rica ederim.
Teşekkürler.


Kod:
Sub DS_SAYILARI()
Dim yenimail As Outlook.MailItem
Set yenimail = CreateItem(olMailItem)
Set FSO = CreateObject("Scripting.FilesystemObject")
Set mysignature = FSO.OpenTextFile("C:\Documents and Settings\Abcd\Application Data\Microsoft\Signatures\zzz.htm", 1)
With yenimail
.To = "xxxx@falanfilan.com.tr"
.Subject = "DS SAYILARI..."
.HTMLBody = "Bilgilerine..."
.HTMLBody = .HTMLBody & "<br><br>" & mysignature.readall
.Attachments.Add "C:\Documents and Settings\Abcd\Desktop\DS SAYILARI.XLS"
.Display
End With
Set yenimail = Nothing
End Sub
 
Verdiğim koddaki kırmızı renkteki kısma dikkat edin ve kodunuzu buna göre uyarlayın.
Kod:
Sub CreateHTMLMail()
'Creates a new e-mail item and modifies its properties.

    Dim olApp As Outlook.Application
    Dim objMail As Outlook.MailItem
    Set olApp = Outlook.Application
    'Create e-mail item
    Set objMail = olApp.CreateItem(olMailItem)

    With objMail
        'Set body format to HTML
        .BodyFormat = olFormatHTML
'        .HTMLBody = _
'            "<HTML><BODY>Enter the message text here. </BODY></HTML>"
'            .BodyData = "<font color=green>Welcome to my email</font>" & _
vbCrLf & vbCrLf & "<h1>It is working...</h1>"
        .HTMLBody = "<[color=red][B]font face = calibri[/B][/color]>Welcome to my email</font>" & _
vbCrLf & vbCrLf & "<h1>It is working...</h1>"
        .Display
    End With
End Sub
 
Çok teşekkür ederim.
 
Geri
Üst