>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'
create cursor myDocs (myDoc g)
append blank
select myDocs
blank
append general myDoc from (getfile('DOC')) linked
activate screen
clear
with ThisForm.DocEditor
.Content.Select
with .object.Application
? .Selection.Text
for each oConverter in .FileConverters
? oConverter.Name
endfor
endwith
endwith
Cetin