The Output works fine in PDF, but not in Word, Apex:Repeat is not rendering the contacts in a word document. Could someone give me suggestions as to why it is not working?

<apex:page standardController="Account" standardStylesheets="false" applyHtmlTag="false" showHeader="false" contentType="application/msword#SalesforceCat.doc" >

    <!-- styles -->

        <img src='https://c.na15.content.force.com/servlet/servlet.ImageServer?id=015i0000008RMYR&oid=00Di0000000hz1j&lastMod=1443192829000' title="logo"/>
        <h4> This is an example of table styles.</h4>
        <table width="100%" class="table-bordered">
            <th> Name</th>
            <th>First Name</th>
                <apex:repeat value="{!Account.Contacts}" var="con">
  • are you able to see the logo in the document? – Santanu Boral Apr 24 '17 at 20:28
  • @SantanuBoral: No, Logo is also not coming up. however major issue is with Contacts. – Ajay Apr 24 '17 at 20:30
  • without the logo document is showing contacts. your code is rendering contacts properly at my DE. Are you correctly passing the AccountId in the URL which has contacts? – Santanu Boral Apr 24 '17 at 20:32
  • @Yes. For some reason it is started working. Thank you. – Ajay Apr 24 '17 at 20:37
  • 1
    close your own question – Santanu Boral Apr 24 '17 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.