All Questions
50
questions
1
vote
2
answers
65
views
Runtime Error - Set olRule = olRules.Item(i) after Microsoft update, where rules setup as 'Through the Specified Account'
ERROR: 2020.05.26 - Since last Microsoft update, code fails on rules setup as 'Through the Specified Account'.
When it hits
Set olRule = olRules.Item(i)
it throws:
Run-time error '-2146664191 [...
0
votes
1
answer
42
views
Outlook VBA ItemAdd fails operation if executed after a rule that calls a script
I'm having trouble with the ItemAdd event routine when it runs after a rule that calls another script has been executed. Specifically the ItemAdd routine is only in charge of marking as read what is ...
0
votes
1
answer
202
views
Inbox Rule "on this computer only" that runs a macro fails periodically
I have an Inbox rule that runs when a message arrives "on this computer only" which executes a macro.
The macro extracts the domain from the sender's email address. It also overrides the ...
1
vote
1
answer
180
views
Unexpected error of a rule in Microsoft Outlook
I have a rule launching a VBA macro in Outlook (Office 365). The macro is activated when an email arrives on one of the Exchange accounts configured in the profile. It is used to sort the email that ...
0
votes
2
answers
123
views
Outlook macro not writing to shared mailbox
The following macro creates an Outlook rule correctly, but only in my private email account, not in the shared mailbox I am targeting. Can someone please identify any errors/omissions in the code that ...
0
votes
1
answer
102
views
Why does Outlook VBA AutoFormatRules.Add not add an AutoFormatRule?
I'm trying to create AutoFormatRules for my Outlook calendar through VBA, and running into several issues.
Here's my POC code:
Public Sub CreateAutoFormatRule()
Dim afr As Outlook.AutoFormatRule
...
0
votes
2
answers
447
views
Creating Outlook folders and rules using VBA
I am trying to create a folder in the Inbox for each unique sender of selected email(s), and a rule to move future messages from those senders to the appropriate folders.
Sub CreateSenderFolderAndRule(...
0
votes
2
answers
457
views
Rule with code to save attachments stopped working
I used the script in a rule to save attachments to a folder that exists on my C:\ drive. It ran last week but now doesn't.
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment ...
1
vote
2
answers
41
views
Can I remove a reference to a specific cell in a rule containing a formula so I can reuse it across multiple columns?
I'm trying to apply the same rule to different columns, which will fill the cell with the color green if it is empty.
I'm getting the rule through recording a Macro, but cannot figure out a successful ...
0
votes
3
answers
76
views
Error Calling Python Code from VBA in Outlook
I am trying to run a python script that is triggered by a rule in outlook. My current process is to write a VBA script that is triggered by the rule - the script simply just calls the shell method as ...
0
votes
1
answer
385
views
How can I have multiple 'scripts' available to run multiple rules?
How can I have multiple 'scripts' available to run multiple rules? The only code that appears available to run with Rules/run a script is the code pasted in ThisOutlookSession. The modules below do ...
0
votes
1
answer
552
views
Save all attachments from Outlook emails by using both Outlook Rules feature and Outlook VBA script [duplicate]
I used an Outlook Rule function to determine all the emails that I receive from this "X" email address and the Rule is set-up in such a way that it will run a VBA script when the rules ...
0
votes
2
answers
201
views
How can I set MessageHeader when creating a rule?
I create a rule from text in an input file.
One of the rule conditions is to examine the message header of a received email and move the email based on the message header content.
I tried the .TEXT ...
0
votes
1
answer
96
views
Saving a zipped file, from emails received throughout the day, to the same savefolder
I put this in a rule to automate saving a zipped file I get in emails throughout the day:
Public Sub SaveZip(itm As Outlook.MailItem)
Const saveFolder = "C:\Users\Example\Example\Example\&...
0
votes
1
answer
821
views
Automated Outlook Attachment Download with Email Date
I am hoping someone in here can help me with this request. I have found code shared by someone at https://www.pixelchef.net/content/rule-autosave-attachment-outlook that would help me setup a rule to ...