Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace from word to memo field
Message
De
09/10/2008 16:14:27
 
 
À
09/10/2008 06:25:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01353561
Message ID:
01353929
Vues:
20
>but i need it to display(as editbox) via command button at the form ,

Remember, you have copied the entire Word file into your memo field. This includes all the control codes which cover fonts, formatting, etc. The editbox sees characters and cannot know that they represent a Word doc and so won't do any of the formatting.
>ShellExecute(0,'Open', GETFILE(), 0,0,1
and what file would you be pointing to when the GETFILE() executes?

Do what Tore has told you. Use COPY MEMO or STRTOFILE() to create a temporary file which can then be opened with ShellExecute(). Make sure you give it a DOC extension, otherwise ShellExecute() won't know how to open it.



>hi,
>thank you,
>
>but i need it to display(as editbox) via command button at the form ,
>
>i used this code to open .doc via command botton as
>
>SET DEFAULT TO c:\deal
>declare long ShellExecute in "shell32.dll" ;
>	long hwnd, string lpszOp, ;
>	string lpszFile, string lpszParams, ;
>    string lpszDir, long nShowCmd
>
>*ShellExecute(0,'Open', m.lcFileName, 0,0,1)
>
>ShellExecute(0,'Open', GETFILE(), 0,0,1
>
>
>
>
>
>>To use the word document later, you must COPY MEMO yourmemo TO somefile.doc, and then open the file woth Word. The somefile.doc should then be an exact copy of the original word file.
>>
>>>hi,
>>>
>>>i delete it and insert new field as binary memo field, but still same,
>>>
>>>
>>>
>>>>If you cahnged the field type AFTER the append, this won't work.
>>>>
>>>>>i change it to binary memo field? still
>>>>>
>>>>>thanks
>>>>>>Your memo field must be a binary memo field.
>>>>>>
>>>>>>>thank you,
>>>>>>>
>>>>>>>i try it the ,arabic word.doc show as rubbish ,
>>>>>>>
>>>>>>>if i save it as .txt it is ok,
>>>>>>>
>>>>>>>thanks
>>>>>>>>>hi all,
>>>>>>>>>
>>>>>>>>>i need help to replace word.doc to memo field at my table,
>>>>>>>>>
>>>>>>>>>thanks all
>>>>>>>>
>>>>>>>>Append memo yourmemo from yourfile.doc
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform