You need to sign in to do that
Don't have an account?
Rajus
Unexpected characters in word format.
Hi All,
I am getting some un expected characters in word document some thing like below.
•Hospital
•Clinic
•Nursing Home
•CRO
I tried all possible ways to get rid of this issue but no use.Can any one please help me out to sort out this issue.
Follwoing is my visualforce code:
<apex:page standardcontroller="Business_Requirement__c" standardStylesheets="false" showheader="false" contentType="application/rtf;charset=ISO-8859-1#Word_Document.doc" extensions="GenerateReport_BR" cache="true">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<apex:outputText value="{!PrintView}" escape="false"/>
<body>
<h2>Business Requirement</h2>
<h3>This section of the User Requirement Specification contains all of the business requirements of the system.
These requirements are written at a level of detail sufficient to enable designers to design a system that will
satisfy those requirements and testers to test that the system satisfies those requirements.
(Static from one of the field from Release Plan)</h3>
<table width="100%" border="1" cellspacing="0" cellpadding="0" >
<tr>
<th>BR#</th>
<th>Requirement Summary</th>
<th>Use Case</th>
</tr>
<tr>
<td>{!CMAX__Business_Requirement__c.Name}</td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Business_Requirements_Summary__c}"/></td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Use_Case__c}"/></td>
</tr>
</table>
</body>
</html>
</apex:page>
I am getting some un expected characters in word document some thing like below.
•Hospital
•Clinic
•Nursing Home
•CRO
I tried all possible ways to get rid of this issue but no use.Can any one please help me out to sort out this issue.
Follwoing is my visualforce code:
<apex:page standardcontroller="Business_Requirement__c" standardStylesheets="false" showheader="false" contentType="application/rtf;charset=ISO-8859-1#Word_Document.doc" extensions="GenerateReport_BR" cache="true">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<apex:outputText value="{!PrintView}" escape="false"/>
<body>
<h2>Business Requirement</h2>
<h3>This section of the User Requirement Specification contains all of the business requirements of the system.
These requirements are written at a level of detail sufficient to enable designers to design a system that will
satisfy those requirements and testers to test that the system satisfies those requirements.
(Static from one of the field from Release Plan)</h3>
<table width="100%" border="1" cellspacing="0" cellpadding="0" >
<tr>
<th>BR#</th>
<th>Requirement Summary</th>
<th>Use Case</th>
</tr>
<tr>
<td>{!CMAX__Business_Requirement__c.Name}</td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Business_Requirements_Summary__c}"/></td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Use_Case__c}"/></td>
</tr>
</table>
</body>
</html>
</apex:page>
contentType="application/rtf;charset=ISO-8859-1#Word_Document.doc"If this works, please click on "Best answer" to know that it's solved.
Thanks,
Pablo
I tried with contentType="application/msWord", but still i am getting the same.Can you suggest some other way to resolve it.
Thanks,
Rajesh.
VFP
<body>
<h3>This section of the User Requirement Specification contains all of the business requirements of the system.
These requirements are written at a level of detail sufficient to enable designers to design a system that will
satisfy those requirements and testers to test that the system satisfies those requirements.
(Static from one of the field from Release Plan)</h3>
<table width="100%" border="1" cellspacing="0" cellpadding="0" >
<th>Requirement Summary</th>
<th>Use Case</th>
</tr>
<tr>
<td>{!CMAX__Business_Requirement__c.Name}</td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Business_Requirements_Summary__c}"/></td>
<td><apex:outputtext escape="false" value="{!CMAX__Business_Requirement__c.CMAX__Use_Case__c}"/></td>
</tr>
</table>
APEX CLASS
public String getPrintView()
{
return
'<!--[if gte mso 9]>' +
'<xml>' +
'<w:WordDocument>' +
'<w:View>Print</w:View>' +
'<w:Zoom>100</w:Zoom>' +
'<w:DoNotOptimizeForBrowser/>' +
'</w:WordDocument>' +
'</xml>' +
'<![endif]>';
}
}
Thanks,
Pablo
Thanks for your reply,
I am using the same code for printView getter method.Still i am getting the same result.I think some thing needs to be changed at charset property of ContentTYpe in apex:page tag.But i dont know what are all the possible charsets we can specify.
Can you please suggest on this.
Note:Those unexpected characters coming only when the field type is richtext area and having the bullet points and tab space after the bullet point.
Thanks,
Rajesh.
I thought that I have answered, sorry about that.
To include rich text in word files you will need the following contentType:
Thanks,
Pablo
Any other workarounds please..
Thanks,
Raj.