PDA

View Full Version : Can I Specify a Program to Open a doc File?


photoworks
04-10-2001, 08:42 AM
I have a notepad replacement that is small enough to fit on a CD. I would like to use it to open a doc file on my CD. Can I specify the program I want to use when reading a doc file?

I want to be able to keep the formatting in the document and I can't know that all customers will have Word on their systems. Thank you in advance.

David Kay

Mark
04-10-2001, 10:43 AM
Hi,
What you should do is launch the program located on your CD-ROM using an EXECUTE PROGRAM action, and then pass the path to your document as a Command Line Argument.

You should try something that looks like:

EXECUTE PROGRAM ACTION
File Name: %SrcDrv%\DocViewer\MyProg.exe
Arguments: %SrcDrv%\Docs\MyDoc.txt

That's it, you might have to play around with it but it should work.

Please note that if the path to your document contains a space you will have to put double quotes around your Command Line Argument. So it might have to look something like:
"%SrcDrv%\My Documents\MyDoc.txt"

mark.

photoworks
04-10-2001, 10:52 AM
Mark,

Thank you.

David