Could you point the correspondent object to use Wordpad instead of Windows from VFP?

Hi Experts

Could you point the correspondent object to use Wordpad instead of Word from VFP?

This code opens Word:

oWSH = Createobject("")

Open in new window

What is the correspondent to open WordPad ?

Thanks in advance
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you are executing the application by "executing" the document file then this invokes an application to which is the file extension assigned. The effect is same as if you were double clicked any "known" file in Windows Explorer.

If WordPad is not used in such file extension assignment then you have to execute it explicitly, e.g.:

RUN /n "C:\Program Files\Windows NT\Accessories\WordPad.EXE" c:\temp\MyDoc.rtf
oWSH = Createobject("")
oWSH.Run(["C:\Program Files\Windows NT\Accessories\WordPad.EXE" c:\temp\MyDoc.rtf])

To open an empty new document in WordPad simply remove the file name from above commands.
And remember the WordPad.EXE location may vary.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Much better to configure it in Windows Explorer to use WordPad.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Thanks for help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.