The rule I created, I right clicked on the alert email directly and created an alert rule. It did not assign it to the category nor run the script like this.
Then I created the following:
Apply This rule after the message arrives
from SP,SQl Service and with Reference in the subject and on this computer only
move it to the TEST folder
and run Script.
(Sorry, my account won't allow me to post images until it has been verified)
A more simple rule, which I created from scratch. It moves it to the folder i designated, but does not run the script.
I have two version of a script. Both ways work independently of an outlook rule as opposed with rules when I test emailing to myself. This has been the one, I've been trying to use.
I disabled the only other rule that might affect it, and this rule is at the top of the list to run first.
Thank you for the help, please let me know what other information you may need.
Sub PhoneList_ThroughOutlook(item As Outlook.MailItem)
' Ignore the incoming item to be safe.
Dim newItem As MailItem
Dim Atmt As Attachment
Dim FileName As String
Set newItem = CreateItem(olMailItem)
newItem.Attachments.Add "\\controller.alleghenycounty.us\DavWWWRoot\Employee Phone List\Office Phone Directory List.doc"
For Each Atmt In newItem.Attachments
' do not save images that may be in your signature
If InStr(1, Atmt.FileName, "Office Phone Directory List.doc") Then
' If not Citrix
'FileName = Environ("USERPROFILE") & "\Desktop\" & Atmt.FileName
' If Citrix
FileName = "C:\Users\T105739\Desktop\office phone directory list.doc"
Atmt.SaveAsFile FileName
Exit For
End If
Next Atmt
newItem.Close olDiscard
Set Atmt = Nothing
Set newItem = Nothing
End Sub