You need to sign in to do that
Don't have an account?
Generate MS Word doc from Visual force page
Hi.,
Have created MS word doc using Visual force (similar to standard Mail merge functionality).
Main Key is here,
<apex:page standardController="Order__c" recordSetVar="Order" showHeader="false" contentType="application/msword" extensions="Date_Update_ACL" action="{!update_date}">
The reason to move to custom functionality instead of using mail merge in Activity History, we need to generate mail merge doc for more than one record, upon generating the doc we need to update some fields in that record.
Here the problem is, our visual force page generate the MS Word doc in Fire Fox browser but not working in internet explorer.
I dont understand the reason, have you faced this kind of issue, any workaround for this?
Any help appreciated.
Note: PDF can be generated easily but we need to generate in MS word
hi..
i got it IE.
code for it is
<apex:page contentType="application/vnd.msword" cache="true">
please feel free to contact us for further info
from:
Dskvap Developer's Team,
email:kumar77@dskvap.com
Hi,
I am able to create Word Doc,but unable to get Footer into it. Can you help me getting Footer for the Word Doc?
Regards,
ckum
Hi,
Did you mean your custom VF page is supporting Mail Merge functionality ?
Hi, I am trying to render a visualforce page as a word doc. The issue I am facing is that all the HTML code is being printed in the word doc.
eg.
<apex:outputLabel value="Test"></apex:outputLabel>
is being rendered as
<label style="Font-weight:bold;">
Test</label>
in the word doc. How can I handle this. need help
Regards
Himanshoo Seth
Hi, I have a problem while generating a word document, I need the document to show on "Print Layout" view on MS Word, and also, I need to show the page number.
Is there a way to do this?
Add <html><body> tags just after the <apex:page>.
Hope this resolve yur problem
Below is the sample code
<apex:page StandardController="Quote" extensions="Quote_Template_Cls" cache="true" contentType="application/msWord#msword.doc"a>
<style>
.header_holder{
height:5.6em;
border:1px solid #ccc;
width:100%;
background:#6d1f7e;
color:#fff;
font-size: 32px;
}
</style>
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<body>
<div class="logo"><apex:image url="{!$Resource.MILogo}" width="240" height="62"/></div>
<div class="header_holder"> PROPOSAL FOR THE SUPPLY & INSTALLATION OF CODING & MARKING EQUIPMENT </div>
</body>
</html>
</apex:page>
Any help is highly appreciated .
Add the style after the body tag.
Can you please change your code like this.Hope it works for you.
<apex:page StandardController="Quote" extensions="Quote_Template_Cls" cache="true" contentType="application/msWord#msword.doc">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<body>
<style>
.header_holder{
height:5.6em;
border:1px solid #ccc;
width:100%;
background:#6d1f7e;
color:#fff;
font-size: 32px;
}
</style>
<div class="logo"><apex:image url="{!$Resource.MILogo}" width="240" height="62"/></div>
<div class="header_holder"> PROPOSAL FOR THE SUPPLY & INSTALLATION OF CODING & MARKING EQUIPMENT </div>
</body>
</html>
</apex:page>
I='ve got the problem with the Class, an error message :
"The property String PrintView is referenced by Visualforce Page (TestMSWord) in salesforce.com. Remove the usage and try again."