I have this simple table in MSWord 开发者_高级运维2003:
I want to append one more line to this table:
turtle dog rooster maple
Which VBScript commands (or set of commands) would I need here to do it automatically?
(I am using "Windows XP")
Here are some notes.
Set wd = CreateObject("Word.Application")
wd.Visible = True
Set doc = wd.Documents.Open ("c:\docs\addtotable.doc")
Set r = doc.Tables(1).Rows.Add
aa = Split("turtle,dog,rooster,maple", ",")
For i = 0 To r.Cells.Count - 1
r.Cells(i + 1).Range.Text = aa(i)
Next
精彩评论