I got this code off the internet and it works however, it's extremely slow and I can't interrupt it with CTRL-C. I'm just learning VBA and seek expertise in resolving issue. I run this from Word/Mailings/Macro
In regard to slowness: The screen repaints on every record. It doesn't update with current record, just repaints. I tried inserting Application.ScreenUpdating = False but it didn't stop. Not sure I have it in right place. When I say slow I mean incredibly slow. I successfully tried similar code from within excel and it exported 50,000 records in 12 hours whereas this thing has run about 16 hours already and has yet to reach 15,000 records.
The other thing is I can't stop it once it's running short of killing it with Task Manager. In fact I can't even get to the code window once it starts and doesn't respond to cursor clicks on anything. I can't even minimize the screen.
This code has a MasterDocument that the user creates and within the VBA it creates another document or SingleDoc that it exports. Can't help but wonder if this also contributes to slowness but wouldn't know how to alter so just the MasterDoc updates are exports which would be more like my Excel script that just updates the design sheet and exports.
Any suggestions as to how to improve efficiency and/or speed is appreciated.
Please Login or Register to view this content.
Bookmarks