M
muyBN
I'm running a macro in Word 2003 that really chews up memory with the 100 or
so DB records I'm processing with it. I'm thinking that if I turn off screen
refresh (sometimes called echo, I believe) while it's running then back on
again when it's finished, this might speed up the macro. Any thoughts on this
idea and how to do it?
A little background as a lead-in to a secondary question: In this macro
project, I'm data-mining a Webpage saved as plain text or copied/pasted as
Edit-Special-Unformatted Text into a Word doc. I then search out certain key
caption terms (such as "Address:") then retrieve the value following them and
put them into a Word table (for manipulating); then to an Access table (for
permanent storage and query formation); and a CSV file (to produce a mailing
list). The pattern is pretty consistent from one web page to another on the
site I use, so the mining itself isn't that complicated.
The problem I find is that when I finally retrieve data from the table for
insertion into the database and the CSV file, I find that it takes much, much
longer (in run-time) to do this with ranges as compared to using Word's
Search/Find command.
(It's more convenient using cell reference ranges but it forever to process.)
Any thoughts on this? Does anyone else find the same problem with using
ranges? I have 1 GB of RAM and suppose that getting more memory could be an
answer but I wanted to see if there's anything I could do under differently
under my present constraints. Also, you may ask why I don't just import my
table or CSV file into Access. I will be giving this a try again, but I just
remember in the past that Access has given me a lot of errors when trying to
do this with a Word table or a CSV file. Therefore, I prefer to just write it
to a Word table then insert the row values with SQL.
If I'm doing the above-described procedures primitively, let me know. Thanks
in advance for any help.
so DB records I'm processing with it. I'm thinking that if I turn off screen
refresh (sometimes called echo, I believe) while it's running then back on
again when it's finished, this might speed up the macro. Any thoughts on this
idea and how to do it?
A little background as a lead-in to a secondary question: In this macro
project, I'm data-mining a Webpage saved as plain text or copied/pasted as
Edit-Special-Unformatted Text into a Word doc. I then search out certain key
caption terms (such as "Address:") then retrieve the value following them and
put them into a Word table (for manipulating); then to an Access table (for
permanent storage and query formation); and a CSV file (to produce a mailing
list). The pattern is pretty consistent from one web page to another on the
site I use, so the mining itself isn't that complicated.
The problem I find is that when I finally retrieve data from the table for
insertion into the database and the CSV file, I find that it takes much, much
longer (in run-time) to do this with ranges as compared to using Word's
Search/Find command.
(It's more convenient using cell reference ranges but it forever to process.)
Any thoughts on this? Does anyone else find the same problem with using
ranges? I have 1 GB of RAM and suppose that getting more memory could be an
answer but I wanted to see if there's anything I could do under differently
under my present constraints. Also, you may ask why I don't just import my
table or CSV file into Access. I will be giving this a try again, but I just
remember in the past that Access has given me a lot of errors when trying to
do this with a Word table or a CSV file. Therefore, I prefer to just write it
to a Word table then insert the row values with SQL.
If I'm doing the above-described procedures primitively, let me know. Thanks
in advance for any help.