You need to sign in to do that
Don't have an account?
![Tre Pedigo Tre Pedigo](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Changing the format of the "Related Contact Roles" on a microsoft word doc.
Hello all,
I am currently working on a vf page that is essentially a microsoft word form that displays different information about a given opportunity. One of the requirements within this word doc is to display the list of the contact roles that are related to that opportuntity. To do this I am currently using the <apex:relatedList list="OpportunityContactRoles" /> command. This command gives me all of the information I need. However, when the table that is generated from this command is displayed in microsoft word it is not very easy on the eyes. Is there any way I can format this table differently?
Any help would be greatly appreciate, thank you all
I am currently working on a vf page that is essentially a microsoft word form that displays different information about a given opportunity. One of the requirements within this word doc is to display the list of the contact roles that are related to that opportuntity. To do this I am currently using the <apex:relatedList list="OpportunityContactRoles" /> command. This command gives me all of the information I need. However, when the table that is generated from this command is displayed in microsoft word it is not very easy on the eyes. Is there any way I can format this table differently?
Any help would be greatly appreciate, thank you all
I trust you are doing very well.
Some Visualforce native page elements don't have same styling effect on pages rendered as Word document. Therefore it is better you can use standard HTML tags and do the styling using inline CSS or CSS classes defined within the page.
Please refer to the below links which might help you further with the above issue.
https://developer.salesforce.com/forums/?id=906F00000008xO3IAI
https://theviewfromouthere.wordpress.com/2009/10/08/turning-a-visualforce-page-into-a-word-document/
http://salesforcecat.blogspot.com/2014/11/render-visualforce-page-as-word-document.html
https://help.salesforce.com/articleView?id=000247562&type=1
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas