S
sheilaa via OfficeKB.com
below is one partial of my coding. i need to populate date from the
database with only one table, one column but with multiple number of rows..
so the output can look something like this:
id : bla bla
name : bla bla
age : bla bla
i don't know what's wrong with my coding until my computer freeze whenever
i tried to execute these codes..
please help!
..Application.ActiveDocument.Tables.Add.Application.ActiveDocument.Range, 7,
2)
..Application.ActiveDocument.Tables(1).Cell(x, y) = rs.Fields(0)
..Application.ActiveDocument.Tables(1).Cell(x + 1, y) = rs.Fields(2)
..Application.ActiveDocument.Tables(1).Cell(x + 2, y) = rs.Fields(3)
..Application.ActiveDocument.Tables(1).Cell(x + 3, y) = rs.Fields(9)
..Application.ActiveDocument.Tables(1).Cell(x + 4, y) = rs.Fields(3)
..Application.ActiveDocument.Tables(1).Cell(x + 5, y) = rs.Fields(4)
rs.MoveNext
x = x + 1
database with only one table, one column but with multiple number of rows..
so the output can look something like this:
id : bla bla
name : bla bla
age : bla bla
i don't know what's wrong with my coding until my computer freeze whenever
i tried to execute these codes..
please help!
..Application.ActiveDocument.Tables.Add.Application.ActiveDocument.Range, 7,
2)
..Application.ActiveDocument.Tables(1).Cell(x, y) = rs.Fields(0)
..Application.ActiveDocument.Tables(1).Cell(x + 1, y) = rs.Fields(2)
..Application.ActiveDocument.Tables(1).Cell(x + 2, y) = rs.Fields(3)
..Application.ActiveDocument.Tables(1).Cell(x + 3, y) = rs.Fields(9)
..Application.ActiveDocument.Tables(1).Cell(x + 4, y) = rs.Fields(3)
..Application.ActiveDocument.Tables(1).Cell(x + 5, y) = rs.Fields(4)
rs.MoveNext
x = x + 1