Outlook Subject Truncated for 255 characters

Add-in Express™ Support Service
That's what is more important than anything else

Outlook Subject Truncated for 255 characters
 
Balaji




Posts: 9
Joined: 2017-04-19
Hi Team,

We are facing an issue while reading or getting the property value for Subject in Outlook using their type and if the subject contains 255 characters , last two or three characters gets truncated and it would result in only 252 or 253 characters in the Subject for the particular email. Please take a look into it and let me know the update.

object obj = explorer.Selection[i]; // GET SELECTION ITEM FROM OUTLOOK

Type type1 = obj.GetType(); //Explore it to Type

object result = type1.InvokeMember(
"Subject",
BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty,
null,
obj,
new object[] { }); //READ EMAIL SUBJECT

Print result.ToString() // GIVES ONLY 253 characters for Subject Property




Thanks,
Balaji Solayappan
Posted 23 May, 2017 04:59:30 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Helo Balaji,

I've reproduced the issue using early binding and C#. The issue is also reproducible using VBA. I'm going to report this issue on the Outlook for Developers forum; I'll paste a link here once I have it.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 May, 2017 08:41:27 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Posted 23 May, 2017 10:06:01 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Hello Balaji,

It looks like this issue may be a known one. Ken Slovak - an Outlook development guru - suggests using this pathway:

OutookApp.ActiveExplorer.Selection.Item(1).GetInspector.CurrentItem.Subject

Remember to release COM objects!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2017 08:46:53 Top
Balaji




Posts: 9
Joined: 2017-04-19
Thanks Andrei.We will try it out and let you know in case of any questions.
Posted 30 May, 2017 03:18:20 Top