cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting just the text from "Link Comment"

chekm8
Contributor

When accessing the "Link Comment" property via the SDK:

menuItem.GetCollection("Folder of Favorites").Item(1).GetProp("Link Comment")

 

I am getting the value back but its int he RTF format:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg;}}
\viewkind4\uc1\pard\f0\fs20 My Awesome Link Comment\par
\par
\b\par
}

 

Is there a way to just retrieve the text "My Awesome Link Comment" and exclude all the RTF formatting without doing it manually?

4 Replies

ilvetz
Super Contributor

I was looking for how to solve the same problem. Thank you!

Perfect, thanks again Jerome.

hsoegaard
MEGA Partner
MEGA Partner
You probably need to add the Display type to the code

jhorber
MEGA
MEGA

Hello

 

Use 'display' format

Ex

....Item(1).GetProp("LinkComment","Display")

Jerome