[Javascript] Creating Word Document with JavaScript

Troy III Ajnej trojani2000 at hotmail.com
Sat Oct 22 22:51:32 CDT 2005


If it is posible with excel, with word can't be more difficult:
see this example: (it's from jscript 5.x documentation)

var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");

// Make Excel visible through the Application object.
ExcelSheet.Application.Visible = true;
// Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
// Save the sheet.
ExcelSheet.SaveAs("C:\\TEST.XLS");
// Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit();

write this in a tex file and save it as *.js doubleclick and see what 
happens! Any further comment is sufficient.
The only thing you need to nkow further is to see the commands neded to 
enter ms word formatings etc, you can make the app invisible dourin the 
operation if f you like.
<br><br><br><html><DIV>
<P align=center>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>Troy 
III<BR>progressive art 
enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</P></DIV></html>



<BLOCKQUOTE style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #A0C6E5 
2px solid; MARGIN-RIGHT: 0px'><font 
style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'><hr color=#A0C6E5 
size=1>
From:  <i>&quot;Del Wegener&quot; &lt;del at delweg.com&gt;</i><br>Reply-To:  
<i>&quot;\[JavaScript List\]&quot; &lt;javascript at LaTech.edu&gt;</i><br>To:  
<i>&lt;javascript at latech.edu&gt;</i><br>Subject:  <i>[Javascript] Creating 
Word Document with JavaScript</i><br>Date:  <i>Sat, 22 Oct 2005 09:32:39 
-0500</i><br>&gt;Good Morning;<br>&gt;<br>&gt;I have developed a simple flat 
file database consisting of JS Include<br>&gt;files containing mathematics 
definitions, formulas, properties, etc.  I<br>&gt;have also written several 
little JS programs which place identified<br>&gt;database items on a web 
page or on interactive flashcards.  For example<br>&gt;the function call  
myPut('Definition',def_null_set) returns the word<br>&gt;Definition followed 
by the database item named def_null_set all 
properly<br>&gt;formatted.<br>&gt;See<br>&gt;http://www.drdelmath.com/jeffco_intermediate_algebra/chapter_summaries/jeffco_intermediate_algebra_chapter1_summary.htm<br>&gt;<br>&gt;I 
would like to write similar JS programs which would create entries 
in<br>&gt;an MS Word document instead of web pages.  Ideally the program 
would<br>&gt;request a list of items to be included and would create a Word 
document<br>&gt;containing those items.<br>&gt;<br>&gt;Is this possible ?  
Can anyone point me to a source where I might learn<br>&gt;how to do this 
?<br>&gt;<br>&gt;Right now I do not have time to do all of this with a real 
database.<br>&gt;<br>&gt;Thanks for any 
pointers.<br>&gt;<br>&gt;Del<br>&gt;del at delweg.com<br>&gt;www.delweg.com<br>&gt;www.drdelmath.com<br>&gt;<br>&gt;_______________________________________________<br>&gt;Javascript 
mailing 
list<br>&gt;Javascript at LaTech.edu<br>&gt;https://lists.LaTech.edu/mailman/listinfo/javascript<br></font></BLOCKQUOTE>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the Javascript mailing list