I have a number of email accounts that I need to monitor via outlook.
I ahve about 5 each of 6 different sources...i.e. bellsouth dsl, comcast cable, aol...etc. All combined there is a ton of spam. I have not yet found a filter to work as well as just rporting them to the email service provider. Problem is that they all have different parameters...Forward as test...foward as attachment...place "this" in subject line....leave subject line blank etc.
I have a hot key that will move the mail to a specified folder based on the provide (Comcast spam - bellsouth spam etc). I am trying to write a script to set all the parameters for that provider.
Below I an example.
The email account is under the name of Motagu & it is a bellsouth account.
If I manually enter all the charecters via the keyboard it works perfectly.
But when I automate it it does not. In fact 1/2 the time when I open the script I get an errro (Sub or funtion not defined).
I am running w2k Pro & outllok 2000
Can anyone help me?
Thanks
Sub Motagu()
'Set to Forward as Attachment
SendKeys "%t"
SendKeys "o"
SendKeys "m"
SendKeys "%f"
SendKeys "a"
SendKeys "~"
SendKeys "%{f4}"
'Process Spam
For x = 1 To 25
'Set Header
SendKeys "~"
SendKeys "%w"
SendKeys "Thisisspam@bellsouth.net"
'Clear Subject line
SendKeys "%j"
For d = 1 To 50
SendKeys "{del}"
Next d
'Set Mail account & remove "Sent to " record
SendKeys "%p"
SendKeys "%u"
SendKeys "m"
SendKeys "%n"
SendKeys "~"
'Send mail
SendKeys "%S"
SendKeys "~"
'Delete original message
SendKeys "^d"
Next x
'Reset forward as text
SendKeys "%t"
SendKeys "o"
SendKeys "m"
SendKeys "%f"
SendKeys "i"
SendKeys "~"
SendKeys "%{f4}"
End Sub
I ahve about 5 each of 6 different sources...i.e. bellsouth dsl, comcast cable, aol...etc. All combined there is a ton of spam. I have not yet found a filter to work as well as just rporting them to the email service provider. Problem is that they all have different parameters...Forward as test...foward as attachment...place "this" in subject line....leave subject line blank etc.
I have a hot key that will move the mail to a specified folder based on the provide (Comcast spam - bellsouth spam etc). I am trying to write a script to set all the parameters for that provider.
Below I an example.
The email account is under the name of Motagu & it is a bellsouth account.
If I manually enter all the charecters via the keyboard it works perfectly.
But when I automate it it does not. In fact 1/2 the time when I open the script I get an errro (Sub or funtion not defined).
I am running w2k Pro & outllok 2000
Can anyone help me?
Thanks
Sub Motagu()
'Set to Forward as Attachment
SendKeys "%t"
SendKeys "o"
SendKeys "m"
SendKeys "%f"
SendKeys "a"
SendKeys "~"
SendKeys "%{f4}"
'Process Spam
For x = 1 To 25
'Set Header
SendKeys "~"
SendKeys "%w"
SendKeys "Thisisspam@bellsouth.net"
'Clear Subject line
SendKeys "%j"
For d = 1 To 50
SendKeys "{del}"
Next d
'Set Mail account & remove "Sent to " record
SendKeys "%p"
SendKeys "%u"
SendKeys "m"
SendKeys "%n"
SendKeys "~"
'Send mail
SendKeys "%S"
SendKeys "~"
'Delete original message
SendKeys "^d"
Next x
'Reset forward as text
SendKeys "%t"
SendKeys "o"
SendKeys "m"
SendKeys "%f"
SendKeys "i"
SendKeys "~"
SendKeys "%{f4}"
End Sub