Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Default Word Processor
Message
From
08/03/1999 16:50:15
 
 
To
08/03/1999 16:23:08
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00195330
Message ID:
00195354
Views:
13
>>>If anyone knows the syntax to start a blank document in default word processor I would love to see the code.
>>>
>>>The closest I can get is RUN WORDPAD or RUN WINWORD but I have some clients with Lotus WordPro and with Corel WP so calling the Default word pro would be a handy.
>>
>>Is this a case where you will 'know' what file extension to use? If so you can use the API call to shellExecute, or even FindExecutable. IF not, what do you mean by 'default' word processor. (Sorry if I'm being thick).
>
>
>
>Don't appologize, it is my job to make my request clear at the start which I obviously did not!
>
>I would not know the file extention in advance.
>
>My goal is to have something like:
>> ON KEY LABEL F10 RUN "MY DEFAULT WORDPROCESSOR"
>
>which will likely turn out to be more like:
>> ON KEY LABEL F10 DO WORDPRO
>> PROCEDURE WORDPRO
>> SellExecute(GetDesktopWindow(), 'open', mailtowho, '', '.', 5)
>> return
>> endproc
>
>but I do not know if this is readily doable or not.
>
>I am assuming that there is a Registry entry indicating what program should open up word processing docs other than *.TXT (which is always Notepad). There may be no such entry and as such may not be easily coded.
>

No, the file association is to a particular file extension; IOW, there's an HKEY_CLASSES_ROOT subkey for .DOC, .TXT, .WPD or whatever. Decide on a file extension and use the executable pointed to by FindExecutable(), or launch a file using ShellExecute() with the open verb and the name of the file to edit or create.

FWIW, there should always be an association for .DOC (WordPad if nothing else will be there; Word at least asumes responsibility for the .DOC files if it's there. I can't speak to other products and how they deal with the .DOC association.)

>Any ideas???
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
Next
Reply
Map
View

Click here to load this message in the networking platform