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
RAJJ SHEKARRRAJJ SHEKARR 

Images are not displaying in MS Word Doc (From Non Document Obj)

Hi Team, 
I'm trying to dispalying an image on Document from VF page using Document object which is working fine. 
But after migrating to Lightning I was forced to use either Files / Static Resrouce to store and access the images.
When I use any of them(Files [stored in Assert Library] / Static Resource[Made public]) to render the image on Docuemnt, it is not getting displayed on Doc.

Could you suggest which option I need to use in order to display image on Ms Doc (not using Documents Obj).

Any help in this regard will really helpful and appritiated.

Here is my sample code
==================
Main VF Page
****************
<apex:page standardController="Opportunity"  contentType="application/msword#DocName}-{!TODAY()}.doc"
           extensions="DocGeneratorController" showHeader="false" sidebar="false" standardStylesheets="false" applyHtmlTag="false" applyBodyTag="false" cache="true">
<apex:include pageName="Header" id="Head_id"/>
</apex:page>


Header.vfp
************
<apex:page standardController="Opportunity" >
<!--
Version 1 (using Documents Obj): Working for Doc & PDF 
<img src="{! $Label.Sandbox_URL}/servlet/servlet.ImageServer?id={! $Label.Logo_DocId }&oid={! $Label.Organization_ID}"  height="55"  width="220" /> 
-->

<!-- 
Version 2 (using Static Resource): Working for PDF only not for Doc
<apex:image id="theImage" value="{!$Resource.logo}" height="42px" /> 
-->
                    
<!--
Version 3 (using Files [ContentVersion & ContentDocument objs]):
working only for PDF not for Doc
<img src="{!' /sfc/servlet.shepherd/version/download/' + v.contentVersion.Id}" />
-->
</apex:page>

ThankU Friends in advance.

Thanks
Arami