How can I automatically forward an outlook meeting based on the meeting category or when it's marked private? - vba

I'm trying to automatically forward meetings from my work email to my personal email whenever I flag a meeting as private. I don't really even know where to start. Any one able to help me out?
I've tried looking for solutions based on the category of the meeting but that hasn't yielded any resulted either

You can create a VBA macro where you could handle changes to items by using the Items.ItemChange or AppointmentItem.PropertyChange events. When appointment items marked as private the following property is set under the hood:
Appointment.Sensitivity = olPrivate
So, you need to track changes made to the AppointmentItem.Sensitivity property which returns or sets a constant in the OlSensitivity enumeration indicating the sensitivity for the Outlook item.
But I'd suggest starting from the Getting started with VBA in Office article to be more familiar with VBA environment.

Related

How to setup rule for emails that contains specific words in top email body only?

I created a rule that moves emails that contains a specific word in body to another folder.
It applies whenever that word is in body of older emails down the thread (when you scroll down to older emails that were replied to).
I need it to identify that word within the most recent email body only (and disregard the rest of the thread).
Outlook doesn't distinguish old email bodies and new ones. The message body is a single string. The best what you can do is to compare the message body of two items from the same conversation and extract the newer part. So, following that you will be able to recognize whether a keyword is a part of the newer message or not. The GetConversation method obtains a Conversation object that represents the conversation to which this item belongs. A conversation represents one or more items in one or more folders and stores.
Use the Find/FindNext or Restrict methods of the Items class to find items that correspond to the specified condition. Read more about them with code examples in the following articles:
How To: Use Find and FindNext methods to retrieve Outlook mail items from a folder (C#, VB.NET)
How To: Use Restrict method to retrieve Outlook mail items from a folder
Also you may find the AdvancedSearch method of the Application class helpful. The key benefits of using the AdvancedSearch method in Outlook are:
The search is performed in another thread. You don’t need to run another thread manually since the AdvancedSearch method runs it automatically in the background.
Possibility to search for any item types: mail, appointment, calendar, notes etc. in any location, i.e. beyond the scope of a certain folder. The Restrict and Find/FindNext methods can be applied to a particular Items collection (see the Items property of the Folder class in Outlook).
Full support for DASL queries (custom properties can be used for searching too). You can read more about this in the Filtering article in MSDN. To improve the search performance, Instant Search keywords can be used if Instant Search is enabled for the store (see the IsInstantSearchEnabled property of the Store class).
You can stop the search process at any moment using the Stop method of the Search class.
Read more about that in the Advanced search in Outlook programmatically: C#, VB.NET article.

Remove reminder from incoming email appointment

At my work we use emailed appointments to inform everyone that a person is on PTO. The procedure is to set the reminder to "none" but some forget (we are all human). I would like to find a way to search the subject of the email for the term "PTO" or "leave early" and set the reminder to "none" if one is set.
I have found a number of questions about find the reminders and even how to change them. I am getting stuck on the detection part. I welcome any help.
Here is one of the questions I am using for help.
Question
The answer depends on when you want this to be checked. The most likely event to do this is in the AppointmentItem.Send event. In order to trap that event, you first must "catch" the new Appointment item as it is created. You can do that by monitoring the Inspectors.NewInspector event and only handle AppointmentItem objects. See here for guidance on working with events in Outlook.

Creating tasks in Outlook to run automatically

I am trying to create an automatic task in Outlook 2010, but am having trouble doing so based on my lack of knowledge of Visual Basic, I believe.
I am trying to find a way that I can set perhaps a Macro in outlook to automatically create a calendar appointment when an email is recieved...
Everyday, I will recieve an automatically generated email from an automated system which includes my schedule for the following day. What I want to do is as soon as the email is received, I want Outlook to create an all-day appointment for the next day and add it to my calendar, including the excel spreadsheet (my schedule) which is attached to that same email.
Either for Outlook to strip the attachement away from the email and add it to the appointment, or for the entire email to become the appointment with the Excel sheet still attached.
I've had a browse around online, but cannot seem to find a solution for my problem.
If there is not a way to create the appointment for the next day, the date of the schedule is always included in the subject line (in the format DD/MM/YYYY) and as the email is generated automatically, all of the text in the subject and body remain the same; only the date is changed automatically per email and of course, the attachment too (however is always a spreadsheet in the format .xls).
The main reason that I am trying to do this is so that when I need to check my schedule, I can find it in my calendar, rather than having to trail through my emails to find it. This is especially more convenient when viewing from a mobile device. I know there are probably easier ways of simply finding the original email, but I'm hoping to be able to accomplish this way of working.
Currently, I do this manually by creating a new all-day appointment in my calendar each evening after I receive my schedule, then copy the excel spreadsheet from the email to the calendar appointment, add the subject line "Current Day Schedule", then save. This doesn't take particularly long, but to have it completed automatically would be amazing
Any assistance that anyone can provide would be incredible!
Best,
Without providing too much actual code (although I can edit my response from home later), here is what I would do:
Using Outlook's NewMail event, check the subject of the most recent message. In theory the "schedule email" is pretty standard and you can identify it based on its subject.
If the newest message is the schedule, then open the Appointments collection and create a new item.
Modify all of the properties to suit your needs, including adding an attachment.
All of this requires you have some VBA knowledge...which I'm not sure you have at your disposal or not.

Creating a form to send multiple emails to existing emails using Rails

I'm building an order management system for customers. I need to set it up so I can build a form that emails a brief of the order status to a customer. The trick is that a customer can have multiple emails i.e no limits on that and the form I need to set up would show the brief generated in a textbox(nothing hard there) as well as a list of checkboxes with the email addresses which to send to.
Clicking on/off the checkboxes determines which addresses would the brief be sent to. I have everything worked out except for one main thing i.e the form - I'm not sure how can I actually set this part up i.e I'm using simple_form here and I'm not sure which model would I be making the form against? Do I need to build another model here? I'm pretty stuck.
May be you can create model like Email without database and use all ActiveRecord helper methods. These articles may be helpful.
http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/
http://railscasts.com/episodes/193-tableless-model?view=asciicast

Difference between 2 meetings overlapping each other

I'm having this issue:
I'm using VBS to extract all meetings from our conference rooms.
Sometimes I get from the same room 2 meetings that overlap each other for a certain amount of time. But, outlook shows only one of them.
I've tried to check all the item.fields to see what seems to be the criteria by which a meeting is shown in shared calendar, or not, but all seems to be the same for both.
I would have uploaded my code here, but it is very long, about 350 code lines.
So, my question is, what property is used by outlook to show to other people in a shared calendar, a meeting, if it overlaps with another one?
I`ve found the answer.
Microsoft uses this model for recurrent appointments:
When a recurring event is created, the item.isRecurring is set to True.
then the colection occurrences is added to item, and reccuring pattern object.
If you delete or modify one or more occurrences, anther object is added to occurences, exception. All deleted, or modified occurrences can be found here.
the strange thing is that even if an occurence is deleted, you can still find it as active, and thus, overlaying with the appointments created afterwards.
The trick is to check all the way, even in exceptions, in order to be able to get same view as in Outlook.
if you need additional details, pm me.