Merhaba,
Aşağıdaki kod gelen maili otomatik otamatik olarak farklı bir mail adresine iletiyor (Forward) sadece belli bir konuda gelen mail için bu makroyu çalıştırmak için nasl bir değişiklik yapmalıyız
Aşağıdaki kod gelen maili otomatik otamatik olarak farklı bir mail adresine iletiyor (Forward) sadece belli bir konuda gelen mail için bu makroyu çalıştırmak için nasl bir değişiklik yapmalıyız
Kod:
Option Explicit
Sub MyFwd(olItem As MailItem)
Dim olFWD As MailItem
Dim olInsp As Outlook.Inspector
Dim wdDoc As Object
Dim oRng As Object
Set olFWD = olItem.Forward
With olFWD
.Display
.Subject = "The new subject"
.To = "someone@somewhere.com"
Set olInsp = .GetInspector
Set wdDoc = olInsp.WordEditor
Set oRng = wdDoc.Range(0, 0)
oRng.Text = "Please see the correspondence below."
.Send
End With
olItem.UnRead = False
lbl_Exit:
Set olFWD = Nothing
Set olInsp = Nothing
Set wdDoc = Nothing
Set oRng = Nothing
Exit Sub
End Sub
