I have Outlook 2016 on my computer at work and the "Run a Script" rule has been disabled. I'm aware of the changes that should be made in the regedit file, but I need admin access to do so. My IT team is located across the country from me, so I've been waiting for two weeks for them to change this and I'm convinced that it's never going to happen.
So, I'm wondering if there's a workaround or a way to code the same process?
When I receive an e-mail with certain words in the subject line, I would like the rule/script to save the file attachment (inside the e-mail) into a folder on my computer.
I'm no VBA expert at all (especially with Outlook), so I'm probably far away from being on the right path, but I've given it a shot:
Private Sub Application_Startup()
Dim oRule as Outlook.Rule
Dim oRuleAction as Outlook.RuleAction
Dim oRuleCondition as Outlook.RuleCondition
Set oRule = colRules.Create("Transfer Attachment", olRuleSubject)
Set oRuleCondition = oRule.Conditions.Subject("FINAL-CPW GRP SALES")
Set oRuleAction = SaveAtlasReport
End Sub
Public Sub SaveAtlasReport()
Dim att as Attachment
Dim FileName as string
FileName = "C:\Users\WCD1867\Documents\AttachTest\PositivePOS.xlsx"
att.SaveAsFile FileName
End Sub