Temmuz 2010
Pts Sal Çar Per Cum Cts Paz
« Ara    
 1234
567891011
12131415161718
19202122232425
262728293031  
UserOnline
Üye: 10 / Kategori: 30 / İleti: 33 / Yorum: 10 / Sayfa: 4

PostHeaderIcon Outlook’tan makro ile mail gönderme



Outlook’tan sürekli aynı tarzda yazdığınız, tekrar yazmak veya kopyala-yapıştır yapmaktan sıkıldığınız mailler oluyor mu?
Benim oluyor. Bu yüzden yarı otomatik bir kod hazırladım, bunu Outlook’a eklediğim bir menüye atadım ve işlerimi kolaylaştırdım.
 
Aşağıdaki örnekler, müşteri siparişlerine termin isteme ve termin verme örnekleridir.
 
Termin isteme maili:
[code]Sub Outlook_makro_mail()
    Dim NewMsg As Outlook.MailItem
    Set NewMsg = CreateItem(olMailItem)
    On Error Resume Next
    musteri = InputBox("Müşteri?", "Müşteri adı yazınız:", "")
    siparis = InputBox("Sipariş?", "Sipariş kodu yazınız:", "")
    If musteri = Empty Or siparis = Empty Then MsgBox "Müşteri veya sipariş numarası girilmedi.", vbCritical, "İşlem yapılamaz!": NewMsg.Delete: Set NewMsg = Nothing: Exit Sub
   
    kime = "isteburasi@gmail.com"
    bilgi = "isteburasi@gmail.com"
    gizli=""
   
    imza = "Bülent" & vbNewLine & _
        "Aradığınız Forum İşteBurası" & vbNewLine & _
        "www.isteburasi.net"
       
    With NewMsg
        .Subject = musteri & " - " & siparis & " için termin rica edebilir miyim?"
        .To = kime
        .CC = bilgi
        '.BCC = gizli
        .Body = "Merhaba." & vbNewLine & vbNewLine & musteri & " - " & siparis & " için termin rica edebilir miyim?" & vbNewLine & vbNewLine & "İyi çalışmalar." & vbNewLine & vbNewLine & vbNewLine & imza
        .Display
    End With
    Set NewMsg = Nothing
End Sub
[/code]
 
 
Termin verme maili:
[code]
Sub Termin()
    Selection.TypeText Text:="Merhaba."
    Selection.TypeParagraph
    Selection.TypeParagraph
    frmTermin.Show
    'tarih = InputBox("Tarih?", "Tarih giriniz:", "27.02.2009")
    Selection.TypeText Text:="Termin tarihi : " & frmTermin.DTPicker1.Value
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeText Text:="İyi çalışmalar."
    Unload frmTermin
End Sub
[/code]
Termin verme mailini ister InputBox ile tarih girerek, ister form üzerine eklenen DTPicker1 ile yapabilirsiniz.


Paylaş:
  • Facebook
  • Google Bookmarks
  • Yahoo! Buzz
  • del.icio.us
  • Digg
  • Live
  • TwitThis
  • Webnews.de
  • BlinkList
  • E-mail this story to a friend!
  • MSN Reporter
  • MySpace
  • Turn this article into a PDF!
  • Print this article!
  • RSS
  • Twitter
  • Yahoo! Bookmarks

Leave a Reply

You must be logged in to post a comment.