Tables storing results of Stored Procedure

E

Edward Li

Dear all,

I need to populate the result of a stored procedure from SQL Server into a
Word 2000 document and present the result as a table. The result of the
stored procedure can be up to thouands of rows, which construct a table of
over hundreds of pages.

I use ADO to run the stored procedure and populate the result as a delimited
text Then I use ConvertToTable to create the table from the delimited text.
This works fine. However, I need to apply differet format to each columns of
the table (alignment, fonts...etc.). Since, in Word 2000, Table object does
not support the Style property, it takes long time to apply each style
separately. Is there a more efficient way?

The result of the stored procedure contains carriage return. Therefore I
need to convert the carriage return to another character before running
ConvertToTable and then use Find.Execute to replace them back to carriage
return afterwards. Is there a more efficient way?

Another question is that will it be faster if I use Database Fields instead
of using ADO to get the result?

Thank you very much.

Edward Li
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top