• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 60
  • Last Modified:

Office 365 Subject

Is there a way to search for e-mails / calendar items with a specific word in it like "registered" and remove that line only and keep the rest of the subject
Exchange / Office365
Example : [REGISTERED] - Realsubject
Remove the [REGISTERED] and keep Realsubject

Thanks in advance!
0
Marcos Santo
Asked:
Marcos Santo
  • 2
1 Solution
 
Vasil Michev (MVP)Commented:
There's no built-in functionality that will do this, you will have to code your own solution using the EWS or REST API.
1
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
The code in EWS would be something like this
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);

service.Credentials = new NetworkCredential(mailboxUserName, mailboxPassword, mailboxDomain);
service.AutodiscoverUrl(mailboxEmailAddress, RedirectionCallback);

FindItemsResults<Item> findResults = service.FindItems(
   WellKnownFolderName.Inbox,
   new ItemView(500));

foreach (Item item in findResults.Items)
{
    if (item.Subject.StartsWith("[REGISTERED] - "))
    {
        item.Load();
        item.Subject.Replace("[REGISTERED] - ", "")
    }
}

Open in new window

0
 
Marcos SantoAuthor Commented:
Thanks all for responding. Our Programmer will have a look at this later this week. Probably. Wednesday.
0
 
Marcos SantoAuthor Commented:
It looks like we are able to solve this problem by using some parts of your code. Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now