D
Devhead
i have tables(number of tables vary) within my word document and it contains
text(header text, general label text, etc.) that i need to key off of in
order to "grab it" and populate the table with field values from an SQL
server database. i know how to retrieve the field data but what is the best
method to "find" the table text in question and then insert the db field
values at the appropriate cell within the table. here's what i'm thinking
about, but i don't know if it's the best approach:
1. determine if there are any tables in the document. if so, go to step 2.
if not, abort.
2. cycle through all the tables in the document(each column and each row)
looking for the "text" that tells me that it's the table that i want. i
didn't design the original document template or i would have placed
bookmarks instead. so can't key off of bookmarks or any other "tag".
3. when find table, populate it with field values.
4. pray that it isn't slow.
another thing that is potentially a problem is there is no way to a) prevent
user from moving these tables around b) "lock" them down so they cannot be
deleted. if there is, i would like to know how.
thanks.
devhead
text(header text, general label text, etc.) that i need to key off of in
order to "grab it" and populate the table with field values from an SQL
server database. i know how to retrieve the field data but what is the best
method to "find" the table text in question and then insert the db field
values at the appropriate cell within the table. here's what i'm thinking
about, but i don't know if it's the best approach:
1. determine if there are any tables in the document. if so, go to step 2.
if not, abort.
2. cycle through all the tables in the document(each column and each row)
looking for the "text" that tells me that it's the table that i want. i
didn't design the original document template or i would have placed
bookmarks instead. so can't key off of bookmarks or any other "tag".
3. when find table, populate it with field values.
4. pray that it isn't slow.
another thing that is potentially a problem is there is no way to a) prevent
user from moving these tables around b) "lock" them down so they cannot be
deleted. if there is, i would like to know how.
thanks.
devhead