Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Jorge Luis Vejerano
  Where is Jorge Luis Vejerano?
 panama
 Panama
 Jorge Luis Vejerano
 Tags
Subject: RE: General Fields to Memo Fields
Thread ID: 78319 Message ID: 78499 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Tuesday, October 4, 2005 3:30:28 PM         
   


> > > > Assuming that your term "richtext format data" represents the OBJECT like Word.Document in general field, and you wish to copy TEXT into memo field, then this may help:
> > > >
> > > >
> > > > use (your_table)
> > > > GO (record_number)
> > > >
> > > > local oForm
> > > > oForm = Createobject('_Form',(general_field_name))
> > > > oForm.myOLe1.refresh
> > > > oForm.myOle1.Content.Copy
> > > > REPLACE (memo_field) WITH _cliptext
> > > > oForm.release
> > > > RETURN
> > > > *--------------------
> > > > Define Class _Form As Form
> > > > PROCEDURE iNIT
> > > > LPARAMETERS pGenFieldName
> > > > this.addobject('myOLe1',"OleBoundControl")
> > > > this.myole1.ControlSource = ALIAS()+'.'+pGenfieldName
> > > > ENDPROC
> > > > Enddefine
> > > > *--------------------
> > > >
> > > >
> > > >
> > > > Best Wishes,
> > > >
> > > > Yuri Rubinov
> > >
> > > Hi again Mr. Yuri...
> > >
> > > The following line of code show me an error:
> > > oForm.myOle1.Content.Copy
> > >
> > > The error says: "The member CONTENT does not evaluate to an object"
> > >
> > > What is wrong?
> > >
> > >
> > > Jorge Luis Vejerano
> > > IT Solutions and Support
> >
> > Depending on the general field content, there could be various reasons. It may be that the file does not contain the text, but pictures; that the file is big and the code should wait while the file opening is completed, etc..
> > If you wish, send to me the table containing this ONLY record. I will see how to help.
> >
> >
> > Best Wishes,
> >
> > Yuri Rubinov
>
> I sent to you an e-mail wth the table...
>
> Jorge Luis Vejerano
> IT Solutions and Support

Jorge,

As far as I see, you have WordPad.Document objects for all records except one, which has Word.Document object. You can check it with

?oForm.myOLe1.oleclass

I am afraid that with WordPad you cannot perform automation; as far as I know, its interface is "wild" and unpredictable. I spent some time to work on it, but I was not able to do anything useful with all methods I know.


Best Wishes,

Yuri Rubinov

ENTIRE THREAD

General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 9/30/2005 6:32:38 PM
RE: General Fields to Memo Fields Posted by Yuri Rubinov @ 9/30/2005 7:35:46 PM
RE: General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 9/30/2005 9:26:13 PM
RE: General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 10/3/2005 7:03:57 PM
RE: General Fields to Memo Fields Posted by Yuri Rubinov @ 10/3/2005 8:50:59 PM
RE: General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 10/3/2005 11:40:16 PM
RE: General Fields to Memo Fields Posted by Yuri Rubinov @ 10/4/2005 3:30:28 PM
RE: General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 10/4/2005 5:29:10 PM
RE: General Fields to Memo Fields Posted by Yuri Rubinov @ 10/4/2005 6:29:26 PM
RE: General Fields to Memo Fields Posted by Jorge Luis Vejerano @ 10/4/2005 6:48:51 PM