Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Add Multiple Tables to a Word DocumentContent of Add Multiple Tables to a Word Document.jsMD5 Hash: 6A40F322098C34BB2172DE8DA31E1BA1 |
||
var end_of_story = 6;
var objword = new ActiveXObject("word.application"); objword.visible = true; var objdoc = objword.documents.add(); var objselection = objword.selection; objselection.typetext ("table 1"); objselection.typeparagraph(); var objrange = objselection.range; objdoc.tables.add (objrange, 1, 2); var objtable = objdoc.tables(1); objtable.cell(1, 1).range.text = "this is cell 1."; objtable.cell(1, 2).range.text = "this is cell 2."; objselection.endkey (end_of_story); objselection.typeparagraph(); objselection.typetext ("table 2"); objselection.typeparagraph(); var objrange = objselection.range; objdoc.tables.add (objrange, 1, 2); var objtable = objdoc.tables(2); objtable.cell(1, 1).range.text = "this is cell 1."; objtable.cell(1, 2).range.text = "this is cell 2."; objselection.endkey (end_of_story); objselection.typeparagraph(); | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |