Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
word docs
Bhargav Coca
Has any one generated DOC files using templating. What did you use to create such templates. Any feed back in this regard will be appretiated.
Thank you
Find more posts tagged with
Comments
gzevin
I'd suggest to produce RTFs instead of docs. And this is easy as RTFs are text files.
I also had experience with many other format conversions. There are heaps of tools on the internet - say html2doc, etc, etc...
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
manager.kabel.zip
Nicholas
I have implemented some work with DOC files using WIN32
LE. It has very good ability to play with DOC files. All whatever you can do in ms-word.
Just if you are on Windows.
Thanks Nic
Nidhi_Agrawal
Just try the following code on tpl..
<iw_pt name="FYIArticle"/>
<iw_perl>
$path='y:/XYZ/main/ABC/WORKAREA/Workarea/docs/test.doc';
open(FH,">$path");
$str='<html xmlns
="urn:schemas-microsoft-com
ffice
ffice"
xmlns:w="urn:schemas-microsoft-com
ffice:word"
xmlns="
http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<title>This is the temp file </title>
<!--[if gte mso 9]><xml>
<o
ocumentProperties>
<o:Author>nidhia</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>nidhia</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>2</o:TotalTime>
<o:Created>2005-09-15T05:10:00Z</o:Created>
<o:LastSaved>2005-09-15T05:11:00Z</o:LastSaved>
<o
ages>1</o
ages>
<o:Words>7</o:Words>
<o:Characters>45</o:Characters>
<o:Company> </o:Company>
<o:Lines>1</o:Lines>
<o
aragraphs>1</o
aragraphs>
<o:CharactersWithSpaces>55</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o
ocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w
oNotOptimizeForBrowser/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format
ther;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:647 0 0 0 159 0;}
@font-face
{font-family:"\
@MS
Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page
Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page
ection1;}
-->
</style>
</head>
<body lang=EN-US style=\'tab-interval:.5in\'>
<div class=Section1>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></u></p>
<p class=MsoNormal><b><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
for making bold characters.<o
></o
></span></b></p>
<p class=MsoNormal><i><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
for making italic characters.<o
></o
></span></i></p>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
for making underlined characters.<o
></o
></span></u></p>
<p class=MsoNormal><b><i><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold italic characters.<o
></o
></span></i></b></p>
<p class=MsoNormal><b><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold underlined characters.<o
></o
></span></u></b></p>
<p class=MsoNormal><i><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making italic underlined characters.<o
></o
></span></u></i></p>
<p class=MsoNormal><span style=\'font-family:Century;mso-fareast-font-family:
"MS Mincho"\'>This is the type change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'font-size:18.0pt;mso-bidi-font-size:12.0pt;
font-family:Century;mso-fareast-font-family:"MS Mincho"\'>This is the type
change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></p>
</div>
</body>
</html>
' ;
print FH $str;
close (FH);
iwpt_output("done");
</iw_perl>
Above is the only sample code.
Regards
Nidhi
Bhargav Coca
Hello Nidhi,
Did you create a header and Footer for any workdocument using the code you used. And i am trying to print dynamic values from the DCT, and couldn't do so. The values are generated on the html page, but not in the word document. Please help.
Thank you