Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation
Message
From
07/05/2001 06:44:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/05/2001 18:14:26
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00502803
Message ID:
00504109
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform