Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation
Message
De
07/05/2001 06:44:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/05/2001 18:14:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00502803
Message ID:
00504109
Vues:
20
>I want to control documents (open,edit and save in location defined by the system) in a window into my form. I tried to use OLE Container, but i only open an existing document setting the documentfile property when defining the class.
>Will i have to define the class and create the object every time i open a new document? Can I embbed an word.application into a OLE Conteiner? Sorry about my english.
>
>TIA,
>
>Alvaro.

Alvaro,
First IMHO it's a bad idea to let user edit a word document with in-place activation. When user wants to edit it letting doc open in word's own application window is better (totally personal opinion).

You could do this :
-Create a form with an Oleboundcontrol named 'DocEditor' whose controlsource is 'myDocs.myDoc'
-Add 2 buttons to form named 'DocOpener', 'WordChecker'
*Form.load
create cursor myDocs (myDoc g)
append blank

*Docopener.click
select myDocs
blank
append general myDoc from (getfile('DOC')) linked

*WordChecker.Click - just to demonstrate that you can access word object model
activate screen
clear
with ThisForm.DocEditor
	.Content.Select
	with .object.Application
		? .Selection.Text
		for each oConverter in .FileConverters
			? oConverter.Name
		endfor
	endwith
endwith
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