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!
LVL 4
Marcos SantoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.