I have VBA code in a non-person mailfile. I need it to run without anyone being logged into that Outlook account. It saves Excel attachments to a network share (see below). It is currently set to run as a rule against all new incoming mails.
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim dateFormat
dateFormat = Format(Now, "mmdd H-mm")
saveFolder = "C:\Test\One"
For Each objAtt In itm.Attachments
If Right(objAtt.FileName, 3) = "xls" Or Right(objAtt.FileName, 4) = "xlsx" Then
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
End If
Next
End Sub
Is it possible to automate this rule to run without being logged into an Outlook client?