Advertisement
| 10.13.2008 at 01:07PM PDT, ID: 23810725 | Points: 200 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: |
function fnCreateWord() {
var objWord = new ActiveXObject("Word.Application");
objWord.Caption = "Test";
objDoc = objWord.Documents.Add()
objWord.Application.Visible = true;
objSelection = objWord.Selection;
var tbl = objDoc.Tables.Add(objWord.Selection.Range,4,3);
// The following is placed properly into the second cell and second column.
var cCell = tbl.cell(2,2).range;
tbl.cell(2,2).Column.Width = 100;
cCell.Font.Bold = true;
cCell.Font.Size = "18";
cCell.text = "ZZZZZZZZZZZZ";
// The following ends up in first row and the first column of tbl. It needs to be after the table.
objSelection.Font.Name = "Arial";
objSelection.Font.Size = "18";
objSelection.TypeText("AAAAAAAAAAAAAA");
objSelection.TypeParagraph();
objSelection.Font.Size = "14";
objSelection.TypeText("" + Date() );
objSelection.TypeParagraph();
objSelection.TypeParagraph();
// There needs to be another table inserted here with more text following.
}
|
Advertisement