我在Document Object中上传了一个.word文件。现在我想获取该文件的内容(正文),我想在Visual Force Page中显示整个内容。
Document doc = [Select d.body from Document d where d.name='docname';
Blob b = doc.body;
String Str = b.toString();
//This Giving an Error Encoding UTC8.
//Then Modified to like below but it's not giving correct data.
//It's giving like @5ywnnn7*96w**.
Document doc = [Select d.body from Document d where d.name='docname';
Blob b = doc.body;
String Str = EncodingUtil.base64Encode(b);
提前致谢。