I want to export my database selected information into word 2003/2007.
If i use below code then it takes more time [10 minutes] for 20000 records to display.

Is there any other way to display 20000 records into word 2003 /2007 within 10/15 seconds

Dim ds As New DataSet
        dscmd.Fill(ds)

        For i = 0 To ds.Tables(0).Rows.Count - 1
            For j = 0 To ds.Tables(0).Columns.Count - 1
                oTable.Cells(i + 1, j + 1) = _
                ds.Tables(0).Rows(i).Item(j)
            Next
        Next

Please help me out .

Please help me out. I am stuck badly

I am going with code that G Waddell suggested

Glad to have helped!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.