>>>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???