Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update text in Wordpad.Document.1 General field
Message
From
03/07/2002 12:54:03
 
 
To
01/07/2002 08:47:23
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00673816
Message ID:
00675009
Views:
15
>Does anybody know how can I do this. If it is not possible with Wordpad, how can I accomplish it with MS Word.
>
>Also is it possible to use DDE (or some other technique) to update text in a Wordpad.Document.1 embeded OLEControl object, when it is on a form?
>
>Any help greatly appreciated

To the moment I have found the following:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/additionalcommunicationsolutions.asp

Sending Keystrokes to Another Application
You can send keystrokes to any active Windows-based application, which behaves just as if you had typed them. Most of the time, sending keystrokes from Microsoft Access is only useful when you need to communicate with an application that does not support Automation, OLE, or DDE, such as Windows WordPad.

So... this means that I cannot use neither Automation, nor DDE with Wordpad.
So I should use some kind of keyboard macros.
I tried both KEYBOARD VFP command and WScript.Shell object SendKeys method but I did not succeeded to automate the entire process of
1. Opening the general field for modification (MODIFY GENERAL)
2. Opening Wordpad.Document.1 for editing (ENTER)
3. Clearing current text (CTRL+A, DEL)
4. Pasting some text (CTRL+V) or (some text)
5. Exiting editing of Wordpad object (ESC)
6. closing the general window (HIDE/DEACTIVATE WINDOW alias.fieldname) or (CTRL+F4)

As soon as I close the general window with VFP command key sequences go to somewhere else but not the Wordpad object. If I use CTRL+F4 in the key sequence it is ignored.

Anybody played before with such kind of "automation"?

Also another possible way to go is with the APPEND GENERAL command
The problem is when I append from file that is not associated I get stuck even if i say this should be Wordpad.Document.1 class
If I append from file that is associated if word is installed I am doomed, because CLASS clause is ignored again.
VFP help shows that we can use both FROM and CLASS clauses. Am I misunderstanding something or ... ?
Also yet again is it possible to do this job with the DATA clause of the Append general command?

Anyone?
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Reply
Map
View

Click here to load this message in the networking platform