Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

OLE IDispatch exception code 0: Buffer for return string is too sm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Diana - 28 Sep 2006 17:45 GMT
I am using Word 2003 in VFP9.0 to create a document with embedded variables.  
The current method requires a repeated Selection() of the entire document.  
I've apparently reached a threshhold of some sort, because on some large
documents I receive this error - although it does eventually complete the
document build if the user hits Ignore through the whole process, but ick!
What is the buffer limitation, and is there any way of setting the buffer
bigger?  if so how?
zkid - 03 Oct 2006 03:09 GMT
If the error is caused by the repeated use of Selection() (and most likely
all of the code that goes along with it), you could try just clearning the
Undo menu to releases some stack space.  So, after each chunk of code (I'm
assuming it's a loop), insert ActiveDocument.UndoClear.

> I am using Word 2003 in VFP9.0 to create a document with embedded variables.  
> The current method requires a repeated Selection() of the entire document.  
[quoted text clipped - 3 lines]
> What is the buffer limitation, and is there any way of setting the buffer
> bigger?  if so how?
Diana - 05 Oct 2006 00:24 GMT
Thanks so much.
I'm sure that this would help, but unfortunately, this is not word.vba, it's
word.basic, and UndoClear is not a valid function.   oh, Legacy Systems!!!
I believe I may be able to call a macro that will call the UndoClear, but
the syntax is giving me fits.  Thanks for your input.

> If the error is caused by the repeated use of Selection() (and most likely
> all of the code that goes along with it), you could try just clearning the
[quoted text clipped - 8 lines]
> > What is the buffer limitation, and is there any way of setting the buffer
> > bigger?  if so how?
zkid - 05 Oct 2006 02:24 GMT
I'm sorry, did you say you're using Word Basic within Word 2003 within Visual
Fox Pro?  I'm very confused here.  Did you know this is the VBA forum?

If the programming is on the Fox Pro side, a name that seems to pop up for
all things Fox Pro is Cindy Winegarden.  She seems to really know her stuff.  
Try posting your question in the following discussion group:  
microsoft.public.sqlserver.connect.  It looks like Cindy peruses it quite
often, and I'm sure she can put you on the correct track.

> Thanks so much.
> I'm sure that this would help, but unfortunately, this is not word.vba, it's
[quoted text clipped - 14 lines]
> > > What is the buffer limitation, and is there any way of setting the buffer
> > > bigger?  if so how?
Diana - 05 Oct 2006 19:27 GMT
Thanks.
I'm programming in FoxPro using a CreateObject(Word.Basic)  to manipulate
text in a Word 2003 document. The rest of the original Word application
works, but I run into this kind of problem trying to extend functionality.  
I found this forum (Word Programming) while looking for Word Basic;  I have
yet to find a forum that deals specifically with Word Basic, since it has
been superceded by vba  - I am lucky that I found an old Word Basic Help
file.  Microsoft would prefer that I re-write the word application using VB.

There are not many people who have experience in VFP calling Word, but I
will see if I can get Cindy Winegarten to pick up on a post.

Thanks again.

> I'm sorry, did you say you're using Word Basic within Word 2003 within Visual
> Fox Pro?  I'm very confused here.  Did you know this is the VBA forum?
[quoted text clipped - 23 lines]
> > > > What is the buffer limitation, and is there any way of setting the buffer
> > > > bigger?  if so how?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.