Hi All,
Trying to convert my outlook VBA macro to run when a new email is triaged into a folder. (inbox.triaged_emails) For example rules_x puts an email into folder triaged_emails and by this email being placed in this folder a VBA rule is applied that pushes said email into one of tow other folders triaged_emails_A and triaged_emails_B. However, i can't seem to get this to function with my current code.
In addition I've had to moved off my original loop to a reverse loop due to the macro halting as i was amending the underlying list it was iterating on. For some reason i can't get the new way to work despite it displaying the correct content in the debug. I assume this is likely due to the fact I'm not passing it as an object but I'm not sure on the best way to do this.
Current static implementation:
Current Implementation That Fails Due To Reverse Loop
When i add a debut line to the above the olMail.HTMLBody returns the html but I cant consume it in InStr.
Ive attempted to follow a stackover flow link that uses the below in order to automate the above but it never seems to triage when an email comes in to the folder. Sadly i can't paste my code as i don't have access to this from home and i had to hand type the above so sorry if it does not work as expected.
Thanks
Bookmarks