Hi guys,
I am writing this because one of my friend get stuck in this requirement, I
am also get surprised why the image is not showing in the MS-Document,
then finally I got its solution.
then finally I got its solution.
Here the code for the VF-Page,
<apex:page
sidebar="false"
showHeader="false"
contentType="application/msword#Test.doc"
cache="true">
<head>
<meta
http-equiv="Content-Type"
content="text/html;charset=UTF-8"
/>
</head>
<img src="Document_URL"
/>
</apex:page>
--> Document_Url is the url of the your image uploaded in the
Document object of Salesforce.
--> cache = "true" for IE.
Hope it helps...
Happy Coding...
Thanks,
Anurag Jain.
Hi Anurag,
ReplyDeleteNice Post.
I tried this code on my SFDC login. Everying fine but image not added in ms doc.
please find below is my sfdc document url.
SFDC URL: https://ap1.salesforce.com/01590000005WO0L
suggest me the correct way.
Hi Manohar,
Deletei cant see your url bz its ask for login credential as it is internal sf link,
and i checked this code again it is working perfectly.
i think there may be issue of document url
please give correct url in image tag.
Thanks
Anurag Jain
Manohar,
ReplyDeleteThe problem may also be due to secure URL. The url should be : http://ap1.salesforce.com/01590000005WO0L than "https....." .
I know by now the issue might be resolved, but this may occur to anyone else referring this page.
Thanks,
Shefali