OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20-03-2003, 12:35
wbochar
Guest
 
Posts: n/a
Default SaveAs Method throwing an in consistent error

I am working on a project that loops through a DB and saves a corel draw file for each D entry. There are about 180 records (which means 180 CDR's created).

When the script executes everything goes great up-to the 80th DB entry. The script dies around 80 (sometimes 78 too) , The Corel Automatic Anti_blowup system kicks in and says the application has become unstable. If I cancel the popup window another popup shows up behind it :

Quote:
RUN TIME ERROR '-2147467259 (80004005)':
METHOD 'SAVEAS' OF OBJECT 'IDRAWDOCUMENT' FAILED.
Anyone have any expierence with this error?

Script works like this:
Code:
open DB get records

loop until all records completed

copy a source cdr file to a 'working' folder
open the working cdr file
modify the text contents
set save as options (always the same)
saveas the doc to a 'finished' folder
close doc

end loop
--Wolfgang :twisted:
Reply With Quote
  #2  
Old 20-03-2003, 14:37
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: SaveAs Method throwing an in consistent error

I guess without seeing the actual code it would be extremely difficult to find the problem. Even though I'm sure it's not your script that is at fault but probably a memory issue or something. Try watching the system memory usage as your macro works and see if there is a memory leak or something.

Another thing you can try is to enable Optimization in the application which could cut down on extra redraws and could save some resources:

Application.Optimization = True
... Loop through your DB records and load/save documents
Application.Optimization = False

Let me know how it goes.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 19:59.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com