I searched this and found this but didn't find an answer.
http://msgboard.alphasoftware.com/al...light=ole+call
I found the threads that allowed me to learn this, but not help with this problem.
I have the following script which opens a Word document, fires a Word macro and closes. It works well AFTER the first run. The very first run can take minutes to execute with a couple of warning messages about "the ole method call is taking longer than expected. D you want to continue waiting?". I will eventually, after several minutes complete. BUT, after the first connection, it works fine. On my stand alone dev computer it takes 1-2 minute. On my networked computers 3-5 minutes. Does anyone know what causes this and how I might get around this extrodinarily long wait for the first call? Thanks
http://msgboard.alphasoftware.com/al...light=ole+call
I found the threads that allowed me to learn this, but not help with this problem.
I have the following script which opens a Word document, fires a Word macro and closes. It works well AFTER the first run. The very first run can take minutes to execute with a couple of warning messages about "the ole method call is taking longer than expected. D you want to continue waiting?". I will eventually, after several minutes complete. BUT, after the first connection, it works fine. On my stand alone dev computer it takes 1-2 minute. On my networked computers 3-5 minutes. Does anyone know what causes this and how I might get around this extrodinarily long wait for the first call? Thanks
Code:
'> docname created elsewhere dim shared vstamp_error as C on error goto error_handler1 dim vmacro1 as C="doc_sign_stamp" Dim wordApp As p wordApp = ole.getobject("","Word.Application") 'wordApp = ole.Create("Word.Application") ‘ doesn’t seem to work with this wordApp.WindowState = 2 'wdWindowStateMinimize wordApp.Documents.Open(docname) end error_handler1: dim shared vstamp_error as C vproceed="no" err = error_code_get() vstamp_error= error_text_get(err) if "Microsoft Word" $ sys_id_enum() wordApp.quit() end if ON ERROR RESUME 0
Comment