Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to Copy General Field to Clipboard
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00580181
Message ID:
00580188
Views:
15
>I'm working on automating a PowerPoint presenation. It works fine when referencing graphic images saved as files. However, I want to make it work by having the images stored as general fields.
>
>If I manually copy a general field image to the clipboard, I can easily paste it to a PowerPoint slide. I have the code to automatically perform the paste, but I cannot determine how to automatically peform the copy-to-clipboard within FoxPro.
>
>The _CLIPBOARD variable is just for text, and DATATOCLIP() copies text records. Is there a command or function to copy a general field to the clipboard?
>

If you use a General field, you're dependent on the OLE Server for the General field to provide the clipboard functionality. If it were a binary memo field, I'd suggest using an API call to move the data, but in the case of the General field, the content of the field is not just the data, but also header information used to identify and communicate with the OLE Server application that manipulates the field. If the OLE Server is not auomatable, you'll need to create keystrokes in the context of the out-of-process server to select and copy to the clipboard - this would involve either API commands that write to the message queue of the server app, or the use of a COM server like the WSH's Wscript.Shell to create keystrokes in the right context; the VFP KEYBOARD command will not cut it here.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform