Sandgroper48
New Member
- OS Version(s)
- Windows
- Outlook version
- Outlook 2019 64-bit
- Email Account
- IMAP
Operating system:: Windows 10Pro
Outlook version: 2019
Email type or host: IMAP
Outlook version: 2019
Email type or host: IMAP
Would appreciate any guidance on the following problem:
I have a macro to run all my Rules in Outlook 2019 (desktop Ver. 2408 Build 17928.20114) but it keeps going into error at
For Each rule in myRules
code in here ..............
NEXT
It goes into error at "Next" with an error message of "Automation error" -2146664191(800c8101) For loop not inialized"
I know the whole of the code is correct because it runs perfectly on my wife's PC with no errors. For that reason I haven't posted the whole code here because I that it runs without error on another PC. Both PC's are running Outlook 2019 (Ver. 2408 Build 17928.20114) under Windows 10Pro.
The error on my PC seems relate to any call to Next or Loop or iterative code such as For Each, For, with Next or Do While, Do Until with Loop because even a very simple procedure such as below also throws the same error at NEXT:
Again, this very simple code works perfectly on the other PC.
I have exhausted just about every possible solution I can find on the Internet with no actual solution found. I have also completely removed and re-installed Outlook 2019 (classic on my PC wih no change to the issue.
Now at the hair pulling stage!
Any assistance would be most welcome.
I have a macro to run all my Rules in Outlook 2019 (desktop Ver. 2408 Build 17928.20114) but it keeps going into error at
For Each rule in myRules
code in here ..............
NEXT
It goes into error at "Next" with an error message of "Automation error" -2146664191(800c8101) For loop not inialized"
I know the whole of the code is correct because it runs perfectly on my wife's PC with no errors. For that reason I haven't posted the whole code here because I that it runs without error on another PC. Both PC's are running Outlook 2019 (Ver. 2408 Build 17928.20114) under Windows 10Pro.
The error on my PC seems relate to any call to Next or Loop or iterative code such as For Each, For, with Next or Do While, Do Until with Loop because even a very simple procedure such as below also throws the same error at NEXT:
Sub Error_Test()
Dim st As Outlook.Store
Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim count As Integer
Dim i As Integer
' get default store (where rules live)
Set st = Application.Session.DefaultStore
' get rules
Set myRules = st.GetRules
i = myRules.count
' iterate all the rules
For Each rl In myRules
Debug.Print rl
Next error throws Here!
End Sub
Dim st As Outlook.Store
Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim count As Integer
Dim i As Integer
' get default store (where rules live)
Set st = Application.Session.DefaultStore
' get rules
Set myRules = st.GetRules
i = myRules.count
' iterate all the rules
For Each rl In myRules
Debug.Print rl
Next error throws Here!
End Sub
Again, this very simple code works perfectly on the other PC.
I have exhausted just about every possible solution I can find on the Internet with no actual solution found. I have also completely removed and re-installed Outlook 2019 (classic on my PC wih no change to the issue.
Now at the hair pulling stage!
Any assistance would be most welcome.