-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflected Assignment Fails #494
Comments
Hi! I think this is not a Python or I am not that familiar with Outlook, but I often use the COM API of Excel, which also belongs to MS Office. When dealing with Excel in And although there are some peculiar syntaxes, such as method calls sometimes not requiring From the printed class names, the following will probably be helpful. https://learn.microsoft.com/en-us/office/vba/api/outlook.rule.conditions I hope this helps. |
Thank you for the response!
Could you elaborate a bit more on what you mean? I had actually reviewed those links you mentioned prior to writing here, but I was not able to identify what I was missing to get this to work. I agree the documents aren't too difficult to navigate, but I'm assuming my current example is either a bug or a gap in understanding on my part for what I need to do to properly set this value. Any further help/advice would be greatly appreciated! |
I have guessed the cause of this error. Please keep in mind that I suspect that this is not a bug in First, the error code of the Line 15 in d1f5cd7
https://learn.microsoft.com/en-us/windows/win32/com/com-error-codes-1 Second, the error message is quite developer friendly. This can be assumed that the Outlook COM library's error raising is carefully implemented. The error messages would not be as friendly if the cause of error was It may be just my imagination, the value to assign to I found the following while researching the Outlook COM API. Best regards. |
What version of Python and |
Ah, that link for error codes I'm sure will prove useful! However, I do believe your assumption on the values is incorrect. My reasoning is because when I created the rule from Outlook's UI and inspected it in the code I provided above we can see when I am printing I have yet to read your last two links (the outlook API link and the older bug link), but I intend to follow up on those later so I'll withhold comment on those until I have more time to understand the material than I do at present. However, regarding your last inquiry on the versions I am using - they are as follows:
Any further help/advice will be greatly appreciated! |
Could you try the same script with Python>=3.10.10 or Python>=3.11.2? I suspect a bug in the from #212 (comment);
|
Sorry for the delayed response - got busy. Upgrading to Python 3.10.10 did seem to fix the reported issue! I'm not entirely sure I understand why yet since I again have to run, but I'll definitely need to read through your links further very soon to get a better understanding of this and why the changes discussed in your links affects this behavior. |
Thank you for your report. #212 was a very challenging error to identify and resolve. We attempted to address it within the Without finding someone with detailed knowledge of If there are no other concerns, I plan to close this issue as resolved in the coming days. Or you are welcome to close it yourself if you prefer. |
Hi all,
I'm trying to figure out what I'm probably doing wrong, but on the off-chance it's a bug I wanted to report it.
I'm currently attempting to write some logic for handling programmatically generating rules in Microsoft Outlook 365 (v2306). Said generated rules currently handle the condition "from fake@email.com or junk@email.com" just fine, but I want it to be a condition like "with '@marketing' or '@orders' in sender's address" and I'm now running into problems due to my nigh complete ignorance of COM stuff in general. I'm not sure where to start looking for information on how to do much of this in Python either?
In an attempt to figure things out on my own I made a rule in Outlook through its UI with a condition like "with @email.com in sender's address" and attempted to interrogate the generated rule object in code for answers on how to configure my own. However, here is where I may have found a bug or am simply showing my ignorance.
I'm not sure if this is a bug? I have a strong feeling it's just my ignorance, but if not then at least I've reported it.
If it's not a bug - I'm hoping someone has the knowledge to help me understand what I'm doing wrong and can help point me to the correct resources so I can learn more about this on my own.
Thank you in advance!
The text was updated successfully, but these errors were encountered: