function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sameer TyagiSameer Tyagi 

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. 

Satish_SFDCSatish_SFDC
Hi,
Please check if this link works.
http://salesforce.stackexchange.com/questions/18243/how-to-preview-documents-in-salesforce

Regards,
Satish Kumar
vicky rathivicky rathi
Hello Sameer Tyagi 

I am stuck on the same issue .pls send me the sample code how to resolve the issue. Its urgent

Thanks