You need to sign in to do that
Don't have an account?
Is there any way to display (.doc, docx, .ppt ) type attachment content on Visualforce page?
I have a .doc type attachment , Attachment contains some images and text . I want to show all content of this attachment on vf page.
I am able to show pdf, images type attachment preview on vf page , issue is only with (.doc, docx, .ppt ) file. it downloads the attachment instead of showing in new tab.
If attachment is 'attach' which is document file and it may contain images and text.
If I convert body to string like this and show string on vf page in outputtext
string attachbody = attach.body.tostring();
I am getting error not UTF-8 type string,
if I use this code show string on vf page in outputtext
string attachbody = base64Encode(attach.body);
I am getting exceed 135 kb error
Your help would be appriciated. Please send me sample code.
OR javascript jquery code if required.
Please check if this link works.
http://salesforce.stackexchange.com/questions/18243/how-to-preview-documents-in-salesforce
Regards,
Satish Kumar
I am stuck on the same issue .pls send me the sample code how to resolve the issue. Its urgent
Thanks