Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting an OLE Word Document from a General Field
Message
De
02/03/1998 03:13:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00081929
Message ID:
00082025
Vues:
68
>>If I have a General Field that contains an OLE embedded Word Document, does anyone know if it's possible to extract this back into a stand-alone Word document file. If so, how would I go about doing this.
>>
>>Thanks!
>>John Zivic
>>Chandler, Arizona
>
>John,
>
>There is no wya to do this with only VFP. You could double click the general field to opne the document in word and then choose Save As from the Word menu to save it under another name.

This is wrong. You could do it with only VFP if you could embed it (that is if the host already exist on the system) in VFP. No need to open by dblclick and choose SaveAs. Word docs could be saved via OLEAutomation using word.basic or word.application (Office97). Since you have a reference to an OLEBoundControl (word object) on a form you could use object's PEM. No need to createobject(), object is there and have a reference to it.
* Assuming you have an embedded word doc, and on a form it's olbWf (OLEBoundControl) 
ThisForm.olbWf.object.saveas("cetins.doc")
For a more detailed example see "Interacting with word using word.basic" in KB\FAQ section.
cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform