Outlook 2010 new assignment automatic setup - vba

I have just started a new job where I receive a new assignment with a job name in the subject field of an email (amongst many other emails).
I would like to build a macro that automatically takes a specified string out of the subject text - creates a new inbox folder with that name - and then sets up a rule to move a copy of all future mail with that string into the named folder.
I am doing this at least 3 or 4 times a day and would like to make this task less repetitive.

The site is for programmers to help one another develop their programming skills. It is not a site where you can post a vague specification and hope someone will implement it for them. No one could implement your specification because too much is missing. You need to start by designing the system you seek which will identify all the information you will need for a specification.
Step 1: You need something to look at every incoming email and classify it as a task-email or not-a-task-email. Is this classification simple? Perhaps task-emails have a subject that starts with the word “Task”. Perhaps there is a phrase within the body of the email? Are task-emails totally consistent? Does a manager have a system for assigning tasks? Perhaps they are given a list of new tasks and a list of people who could action that task. They select a task and a person and the system creates the assignment email. With such a system, the emails will be totally consistent. But, if the emails are hand-crafted by the manager, they will be similar but not identical in format. Handling inconsistencies will make this a much more difficult task.
Step 2: Having identified an email as a new-task-email, the subject must be decoded to extract the task identifier. What is the format of that subject? Is it something simple like “Task xxxxxxx” where “xxxxxxx” is the identifier? Is the subject of a new assignment different from the subject of follow-up email?
Step 3: Your specification implies you can easily distinguish new and follow-up task-emails. I deduce this from the requirement to create a new folder for new task emails and to create a rule that moves any follow-up emails to that folder. I doubt creating a new rule for each task is a good idea. If you have at least 3 or 4 of these emails a day. That is 15 or 20 or more new rules per week. Rules that will have to be checked for every new email. I do not know how your business operates but this does not seem sensible to me. You want to create a new folder per task which seems sensible. Once you have finished a task, I assume you delete the task folder or, better, move it to an archive folder. Then you will have to go into the Rule manager, find the relevant rule and delete it. Will you do that manually or will you want another macro?
Step 4: How are you going to implement this? I think you are correct in thinking a rule is the right approach. Rules have lots of ways of selecting an email for processing and lots of possible actions they can perform on a selected email. However, there is a limit to the selection and action options. I am confident you will exceed those limits. One of the possible actions is to “run a script”. That is, pass the email to a macro that can do anything an Outlook VBA macro can do not just the things Microsoft thought would be useful for a rule.
Step 5: What is the scope of this macro? You have three types of email: new-task, follow-up-task and non-a-task email. Can you have one rule to identify new-task emails and another to identify follow-up-task emails? If you can, you will need a macro to create the folder. You might be able to move follow-up-task-emails with a rule or you might need another macro for that. If you cannot identify a task-email or a follow-up-task email, you will probably have to pass every email to the macro which will handle the classification and the auctioning of the task-emails.
The above is as much of the design as I can create at this stage. You need to finish the design and update your question. I cannot promise that anyone will help you create your macros but at least you will know what you have to investigate to write those macros yourself.

Related

How can i know that a meeting is already created or not?

Is there a way i can find out if the current meeting window from which i opened the add-in (compose mode) is from a new meeting or from an already created meeting that i opened for edit?
Currently this feature, you requested, is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.
There are a lot of use cases where this is relevant:
I believe the purpose of many add-ins is to augment the item (e.g. appointment/meeting or email), the user is currently reading or composing. This is usually done in a 3rd party system by associating the meeting in Exchange with a "record" in a separate system. To find out if the current meeting is already associated with a "record" (and possibly display the contents of it), you need a way to identify the meeting obviously. If it's a new meeting, you know there isn't a "record", however if it's an existing meeting, you need to be able to identity it. Exposing itemId in compose mode would satisfy this need. And by the way, the feature is already requested on User Voice!
I can only speculate as to why Microsoft haven't added the feature yet, but I think Office JS started out with support for emails. Compose-mode for emails is almost exclusively for authoring new (unsent) emails, hence they would never have an itemId.
This is not the case for appointments and meetings, however. They are frequently being edited after they have been created, as meetings are often rescheduled, augmented with a more detailed agenda, etc.
Unfortunately the workaround of using saveAsync to obtain the itemId has several drawbacks as you already alluded to: it's very intrusive as it will leave behind "ghost" meetings (as the user now can't regret saving an appointment/meeting) and it causes the sending of spurious meeting update requests to attendees, etc. And it doesn't work in Outlook for Mac! - one of the big selling points of this add-in technology compared to VSTO/COM-add-ins.
At my company we have attempted several times to port our existing VSTO add-in to Office JS, but everytime we stall on this exact issue, as the drawbacks are simply to many!
However, an approach - besides maybe using some crude heuristics - we have thought about, goes like this:
1) Via EWS (or MS Graph), augment every meeting(!) of every user(!) with a custom add-in property containing the itemId. See: https://stackoverflow.com/a/43140644/10752973 on how to set custom properties from the "outside".
2) When the add-in is opened, see if the custom property is present. If the custom property is there, it's an existing appointment/meeting (and you'll know its itemId). If it isn't there, it's a new appointment.
As I said, we haven't implemented it, but in theory it might work. But it's such a huge hassle (and will burden both the Exchange server and the application itself), for something so simple. We would effectively also need to monitor each mailbox in Exchange to detect newly creating appointment/meetings in order to augment them with the custom property, which is needlessly complex.
But I hope this answer might convince the Outlook Add-ins Team to reconsider adding support for obtaining itemId in compose-mode for appointments/meetings.

Display Distribution List As A Column In Outlook?

A client of ours suddenly wants to add a custom column to his Outlook contact list. He wants this column to display the distribution list that said contact is a part of.
Now at a glance this is much more complicated than he makes it out to be. Not every contact is necessarily in AD, and they could certainly be part of more than one list. This all has to be accounted for in the formula.
I'm leaning towards telling him this is beyond our scope of support, but I though I'd ask around first. Is there some pre-made code out there that performs a similar function? Thanks.
You can certainly retrieve that information programmatically (ExchangeUser.GetMemberOfList), but you cannot display that in the Contacts folder view.
for each lst in Application.Session.CurrentUser.AddressEntry.GetExchangeUser.GetMemberOfList
Debug.Print lst.Name
next

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.

SharePoint, notification email workflow

I was wondering if anyone could possibly help me with my SharePoint 2010 issue. I recently created a CRM System within SharePoint for my small business which utilizes a email notification workflow. The workflow is triggered when the 'Action Needed' field has a 'yes' value, this means that 2 days after the information is created or edited the workflow will notify the particular user that further action is needed.
Previous thread with image of the workflow
Now this is great if myself or other members of the team are only inputting a couple of items but I found out the hard way when i keyed in 20 or so items and received 20 individual emails which is irritating as you can imagine.
So on to my issue, I would like the email notifications to be grouped together in one email so it's more efficient and avoids the need for individual emails. So when one particular user creates or edits multiple records instead of separate email notifications I would like it all in one email. So is this possible while using SharePoint workflows? If it is possible and how would I go about expanding my current workflow to achieve this?
I have already asked this question in the dedicated SharePoint area to no prevail, I could really do with the help also if what I am asking is impossible then could someone at least say so.
Thanks very much to anyone who contributes and helps me with my problem.
If you are using SharePoint Designer , then this is not problem. This is because each workflow can access the data on which List Item the workflow is triggered.
However, this is definitely possible using a custom workflow or an event Receiver.
http://msdn.microsoft.com/en-us/library/ms437502(v=office.14).aspx

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