divan
Member
- Outlook version
- Email Account
- POP3
Hi
I want a rule or a macro that enables me to do the following:
I receive a email from email_A@example.com
I then want to change the subject of the email to the body of the email
than forward the email to email_B@example.com
I can currently change the subject
- BUT it changes ALL my INBOX mail not just coming from email_A@example.com.
I can also forward the email
- BUT not just from the email_A@example.com it sends all my inbox to email_B@example.com
PLEASE help with my script:
Sub ChangeSubjectThenSend(item As Outlook.MailItem)
Dim myolApp As Outlook.Application
Dim aItem As Object
Set myolApp = CreateObject("Outlook.Application")
Set mail = myolApp.ActiveExplorer.CurrentFolder
For Each aItem In mail.Items
aItem.Subject = aItem.Body
aItem.Save
Set myForward = aItem.Forward
myForward.Recipients.Add "email_B@example.com"
myForward.Send
Next aItem
End Sub
I want a rule or a macro that enables me to do the following:
I receive a email from email_A@example.com
I then want to change the subject of the email to the body of the email
than forward the email to email_B@example.com
I can currently change the subject
- BUT it changes ALL my INBOX mail not just coming from email_A@example.com.
I can also forward the email
- BUT not just from the email_A@example.com it sends all my inbox to email_B@example.com
PLEASE help with my script:
Sub ChangeSubjectThenSend(item As Outlook.MailItem)
Dim myolApp As Outlook.Application
Dim aItem As Object
Set myolApp = CreateObject("Outlook.Application")
Set mail = myolApp.ActiveExplorer.CurrentFolder
For Each aItem In mail.Items
aItem.Subject = aItem.Body
aItem.Save
Set myForward = aItem.Forward
myForward.Recipients.Add "email_B@example.com"
myForward.Send
Next aItem
End Sub