By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,421 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,421 IT Pros & Developers. It's quick & easy.

dataobject and rtf/html conversion

P: n/a
I am trying to use dataobjects class to convert rtf to html and back to rtf
again and I can't get it to work. Below is the code...

IDataObject data = new DataObject();
dataSetDate(DataFormats.Rtf,true,strRTF);
if (data.GetDataPresetn(DataFormats.Html,true))
{
strHTML = data.GetData(DataFormats.Html,true).ToString();
}
else
{
// return the formats available code
}

When this code executes it just returns RTF as the only format available.
The implications of the documentation for DataObject is that it does
conversions between common formats and yet it doesn't seem to be doing it at
all. If I use the clipboard to try to do this with DataObject then it only
sees it as Unicode Text even though it is RTF. Does anyone have any ideas
about whether this can work? The documentation seems to strongly imply that
it should.

Thanks,
NWOP.
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.