Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEserver error - string too long 1

Status
Not open for further replies.

ukusa

Programmer
Oct 8, 2001
49
AU
Hiya,

A report that is generated from one of my products is stored in a table. It is in RTF format and can be readily printed using QReport. For extra flexibility for the user, I've successfully made some interaction between table data in Delphi and a Word Template using XP Word. But what I don't know is how to transfer a page length of Memo data across the OLE Server to the doc - I'm using the dual-interface mode. So me application is alive and when finished, Word is still open ready to be edited and saved. Although I had set that Word field to "unlimited", it complains that the "string is too long". Being fresh in the OLE stuff, am I pumping too much data through the OLE to cause this error? If so can anyone help please to rectify this problem? Many thanks in advance!
 
M$ has this very amazing concept of 'unlimited' (I think it's 255 characters). I believe if you actually enter a number in that Word field (like 1000) that you can then put 1000 characters in the field.

HTH



Leslie
 
Thanks for that, but that didn't work either. Just had 134 characters in the report and I had set 1000 and xp can take it up to 32000 approx but it didn't make any difference. It must have something to do with the RTF codes or something on the text. The problem is I can't export just text as the RTF encoding on the text has to exist so one can format the text in my inbuilt RTF editor and somehow transfer that across to word. Word was supposed to be another choice to edit etc. I guess my next trick is to duplicate the copy to clipboard and paste it automatically into the document but the problem with that is OLE Automation doesn't allow paste jobs from Delphi hmmm. Thanks anyway.
 
I've gone another direction and using Microsoft's example of how to merge a created data doc etc and works fine. IS there any listings to list the word codes eg: wdSendToNEwDocument etc. as I can't find too easily how to color paragraphs etc and change their style etc via the properties of the mailmerge command.

Thanks
 
I have a document of MS constants for Word, Excel, Access, PowerPoint and others, that lists all the named constants and the corresponding numerical value. It's for 97 products, but I've been using it with 2000 and haven't had any problems. I can email it to you if you're interested.

Leslie
 
Brilliant! If you could please, Email is

Crisell.Allen@saugov.sa.gov.au

For that you get the points and for your help, Thanks lespaul!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top