Skip meeting request in for each selection loop - vba

I am working on a simple Marco that use to download selected emails' attachments.
It was really a simple logic but I am still stuck.
I found out that my for each loop is always stop when it met the meeting request email.
(It almost took my whole day to figure it out that the meeting request is The Barricade.)
The problem can be fixed by deletion of the meeting request.
And yet, it is really annoying for a lazybones like me.
Therefore, I really curious that is there any method can let the for each loop just ignore/auto unselect meeting requests?
And I have already tried detect the email subject/context to seprate the meeting requests and normal mails.
But it seem like it would just exit the for each loop when it encountered the meeting request.
So currently I don't have any idea about how to fixing it.

Firstly, you need to show the relevant snippet of your code.
Secondly, you should not assume that you are only dealing with the MailItem objects - before accessing an of the MailItem-specific properties, check that the Class property (it is exposed by all OOM objects) is 43 (which is olMail).

Related

Is there a way to make Charles Proxy Breakpoints trigger on Body query hits?

I am going over multiple apps from my company and checking with the help of Charles Proxy if they send data we wouldn't want them to (device names & ID and other kinds of IDs).
I have had success recording play sessions then using the Search function to look for hits on these IDs, however I have been unable to setup breakpoints that would trigger once a request has one of them in its body.
So what it seems like is that breakpoints only work for headers. Is there a way to set them up to also include request body or another feature that could achieve something similar?
What I'd like to achieve is:
-> As soon as a request contains some string anywhere (even the body), Charles warns me in some way that this has happened
-> Ideally, the warning would contain the string that's been found (I have a few ones to check so that'd help)
It would really help me pinpoint the actions that trigger the info being sent more quickly. Since I have a good amount of apps to test, any time saver will go a long way!
Thanks

Bulk POST request without enumerating objects

I'm trying to let my API clients make a POST request that bulk modifies objects that the client doesn't have their IDs.
I'm thinking of implementing this design but I don't feel good about it, are there any better solutions than this?
POST url/objects/modify?name=foo
This request will modify all objects with the name foo
This can be a tricky thing to do with an API because it doesn't age very well.
By that I mean that over time, you might introduce more criteria for the data stored on resources (e.g., you can only set this field to "archived" if the create_time field is older than 6 months). When that happens, your bulk updates will start to only work on some resources and now you have to communicate that back to the person calling the API.
For example, for any failures you need to explain that the update worked for some resources (and list them out) but failed on others (and list them out) and the reason why for each failure (and remember you might have different failure conditions for different resources).
If you're set on going down this path, the closest thing I can think of is the "criteria-based delete" method shown here: https://google.aip.dev/165.

How can I reset recurring meeting in vba?

I wrote vba script to duplication my main calendar to another calendar, including recurring meeting. All is well except when the organizer do out-of-order modifications to the recurring meeting as meeting exceptions. This triggers error for .GetOccurrence(). The solution I can think of is to reset the recurrence pattern (.Exceptions.Count=0) and redo each and every exceptions again. May I know how can I reset the recurrence pattern so that there is no exception?
Thanks!
May I know how can I reset the recurrence pattern so that there is no exception?
The Outlook object model doesn't provide any method or property for that. You need to re-create an appointment anew and set up a recurrence pattern.
Many thanks for the reply. I re-work my program to avoid the need to reset the recurrence pattern. The key realization for me is the function of Original Date. This is the "key" that link my main calendar and my duplicated calendar. I need to loop through all the exception to find the appointment that matched based on original date. With that, I can then use exception(i).start as the key to GetOccurrence().
If you are getting an error in the GetOccurrence() method, that means you are not passing the right date - you need to trap the exception and use the RecurrencePattern.Exceptions collection instead.
If you still want to reset the pattern and using Redemption (I am its author) is an option for you, it exposes RDOExceptions.Clear method to remove all exceptions from an appointment as well as RDOExceptions.Restore to remove a particular exception

Outlook Macro Executes even when deleted

I can usually find an answer by searching the forum and applying my own answer but this has me stumped.
I have some vba in ThisOutlookSession that when a mail item is sent from a shared mailbox it moves that item into the sent items of the shared mailbox rather than the individuals. This has been working fine for roughly about a year...
For some reason in the last two weeks or so it has suddenly started to put two copies of the message into the shared mailbox sent items.
Whilst investigating this I noticed something, I entered a Stop line at the start of my code to allow me to step through it. The code fires, hits the Stop line and Stops as it should, however the item has already moved into the shared mailbox... I then step through the rest of the code and it moves the item again...
This is already strange, but what really got me is I have now deleted the code from the session (all of it nothing left), closed Outlook and rebooted the PC. I then sent a test message and guess what - its once again moved into to the shared mailbox sent items.
I haven't got any rules set up, so it cant be that... I only use ThisOutlookSession in Outlook, so its not firing from another Module
It's as though my script still exists in the background but I am unable to see it.
So my questions are:
1) has anyone else experienced this?
2) how is it possible for code to excecute when it doesn't exist (surely this is the equivalent of a human walking around without a head??)
3) does anyone have any solutions on how to resolve this?
I really hope someone out there can help because this has me completely stumped!
TIA

Outlook VBA Autosave Attachments Rule - Downloadstate is zero?

I have a rule which starts a sub in VBA when a new eMail arrives.
The code automatically saves the attachment of the Mail in a specific folder.
This worked fine, as long as..... I reinstalled the system.
I added everything like it was, but now I'm suffering the following problem:
When the rule hits in, the eMail Object always has zero attachments. I was sniffing around a little bit and found out, that the Downloadstate is still zero (header only) when the sub runs.
On the web we can see lots of code snippets around for this functionality but Downloadstate seems never to be a topic. So it wasn't for me in the past!
What is wrong here? Why is the Downloadstate zero when the VBA Sub starts?
I found a little workaround by querying the downloadstate and re-run the procedure again with the same mail item. This loop works fine. Almost on the next run it seems that the message is fully downloaded already... And the procedure takes place like it should. But as i know that it worked fine right before, I just want to get rid of this again...
Can anybody help?