Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 California - United States
 Barbara Peisch
 To: Kees Henzen
  Where is Kees Henzen?
 Kees Henzen
Subject: RE: Word out of memory???
Thread ID: 143670 Message ID: 143833 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Active X Controls & OLE Automation
Date: Friday, August 31, 2007 10:59:54 PM         

Assuming that the message is accurate and there really isn't enough memory, there are a couple of things you can do.

1. You can reduce the amount of memory VFP is using, so there's more available for other apps. See https://www.foxite.com/archives/not-enough-memory-0000090818.htm for info on how to do this.
2. Check if there's a minimal amount of memory available before trying to open the document. Use SYS(12) for this. I can't tell you how much memory you need to allow. That will take some trial and error on your part.

> Hello anybody,
> When trying to open a Word document from our VFP7 application, we get an error message like:
> Error number: 1429 = OLE IDispatch exception code 0 from Microsoft Word: Er is onvoldoende geheugen. Sla het document nu op.
> The last italic sentences are in Dutch and mean something like: There is not enough memory. Save the document now.
> The most frustrating thing is that it happens only once in a while, and trying to open the same document again immediately after is succesful most of the time.
> We retrieved LINENO(1) when the error occurred, the statement causing the message appears to be:
> oDoc = oApp.Documents.Open(sFileToOpen)
> preceding statements are:
> oApp = CREATEOBJECT( 'Word.Application')
> = KickStartOfficeAddIns(nAppType, oApp)
> oApp.Run('Save_Init') && Set Save button(s) and initialize event handler.
> oApp.WindowState = 1 && Maximized( = not normal or minimized)
> oApp.Activate()
> Extra info:
> - The statement '= KickStartOfficeAddIns(...)' is executed because the auto_exec macros of all the Add-ins that are currently installed for Word will not fire automatically when starting Word with the CREATEOBJECT-statement. The procedure KickStartOfficeAddIns 'kicks' each add-in into action (e.g. initializing a command bar) by explicitly calling the auto_exec macro with a statement oApp.Run(...) for each add-in.
> - The statement oApp.Run('Save_Init') runs a (VB-)macro in a Word add-in we developed to handle save actions for the benefit of our application.
> - The document seems to be opened by Word, it is visible, the message occurs immediately after it is opened, without the user trying to save the document.
> - The document is opened in Word 2003.
> Any enlightenment on this problem would be greatly appreciated!
> Thanx in advance,
> Kees Henzen



Word out of memory??? Posted by Kees Henzen @ 8/30/2007 7:41:52 PM
RE: Word out of memory??? Posted by Eric den Doop @ 8/30/2007 9:52:52 PM
RE: Word out of memory??? Posted by Kees Henzen @ 8/31/2007 10:05:17 AM
RE: Word out of memory??? Posted by Barbara Peisch @ 8/31/2007 10:59:54 PM
RE: Word out of memory??? Posted by Kees Henzen @ 9/3/2007 12:28:03 PM