c# - How to insert hyperlink into RTFBODY property of Outlook Appointment? -


this have far:

richtextbox rtb = new richtextbox(); rtb.rtf = system.text.encoding.utf8.getstring(item.rtfbody); rtb.select(rtb.textlength, 0); rtb.selectedrtf = @"{\rtf1\ansi{\fonttbl\f0\fswiss helvetica;}\f0\pard {\par} {\field{\*\fldinst hyperlink ""http://www.google.com/""}{\fldrslt click here}}";  item.rtfbody = system.text.encoding.utf8.getbytes(rtb.text); 

the code runs fine, , adds "click heere" text, there no link attached text. think i'm close, don't know rtf formatting. appreciated!

you reading rtb.text (plain text), not rtf:

item.rtfbody = system.text.encoding.utf8.getbytes(rtb.rtf); 

Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -