divan
Member
- Outlook version
- Email Account
- POP3
Hi
I need a script that can do the following:
Original Email
Email Subject:
Movement Alarm 555
Email Body:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
___________________________________________
Altered email after script was processed:
Email Subject:
Movement Alarm 555
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
Email Body:
“Phone Number”
___________________________________________
My Script does it half way, it lacks in the following areas:
1. When I add the item.body to item.subject it replaces the whole subject (I only want to add it)
2. When It whould replace the body with mu “Phone Number” it adds a lot of gibberish which I don’t want
Example of what my email outcome is:
Original Email
Email Subject:
Movement Alarm 555
Email Body:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
___________________________________________
Altered email after script was processed:
Email Subject:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
Email Body:
Date: Mon, 19 Jan 2015 08:42:28 +0200
Message-ID: <000001d033b3$1a2ec660$4e8c5320$@co.za>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AdAzsgvdJDRuShGcSiaP+wcwbJIN/QAAQvAw
Content-Language: en-za
“Phone Number”
___________________________________________
This is my script:
Sub ChangeSubjectForward(Item As Outlook.MailItem)
Item.Subject = Item.Body
Item.Save
Set myForward = Item.Forward
myForward.Recipients.Add "sms@fakeserver.com"
myForward.Subject = Item.Body
myForward.Body = "Phone Number"
myForward.Send
End Sub
___________________________________________
I need a script that can do the following:
Original Email
Email Subject:
Movement Alarm 555
Email Body:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
___________________________________________
Altered email after script was processed:
Email Subject:
Movement Alarm 555
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
Email Body:
“Phone Number”
___________________________________________
My Script does it half way, it lacks in the following areas:
1. When I add the item.body to item.subject it replaces the whole subject (I only want to add it)
2. When It whould replace the body with mu “Phone Number” it adds a lot of gibberish which I don’t want
Example of what my email outcome is:
Original Email
Email Subject:
Movement Alarm 555
Email Body:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
___________________________________________
Altered email after script was processed:
Email Subject:
Unit: 0 Version:03.091
Continuous Movement
Back Office
Zone 3
2015/01/20 @ 07h15
Email Body:
Date: Mon, 19 Jan 2015 08:42:28 +0200
Message-ID: <000001d033b3$1a2ec660$4e8c5320$@co.za>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AdAzsgvdJDRuShGcSiaP+wcwbJIN/QAAQvAw
Content-Language: en-za
“Phone Number”
___________________________________________
This is my script:
Sub ChangeSubjectForward(Item As Outlook.MailItem)
Item.Subject = Item.Body
Item.Save
Set myForward = Item.Forward
myForward.Recipients.Add "sms@fakeserver.com"
myForward.Subject = Item.Body
myForward.Body = "Phone Number"
myForward.Send
End Sub
___________________________________________