Launch a file using lotusscript

In lotusscript I am using “ShellExecute” win api to launch files. Is there anyway to lauch a file using lotusscript, without using any API?

Subject: You can use the “Shell” LS command…

  • But you don’t have as much control over the process as using the API. Since you are using the API already I would continue to do so unless you have an overwhelming reason not to.

Hope this helps…

Subject: Shell is for EXE files

Shell is for EXE files…I want to open all file types.

Subject: My bad. I thought Shell would launch associated files…

  • Quite frankly since I stumbled on the API route I’ve never used Shell. Too limiting. I simply wrapped the API calls in a LS class and use that.

Sorry for the mishap…

Subject: Can be used

Not completely true, Shell can be used to open documents but you need to tell it what programme to use to open the document. It’s possible to use explorer.exe though:

shell(“Explorer.exe c:\doc.doc”)

Subject: API calls

Do you have an example of this:I simply wrapped the API calls in a LS class and use that.

Since Shell no longer works with Windows 7?

Subject: I don’t recall personally…

  • But the older forums, R5 in particular, should have a number of posts about it. Long as the API hasn’t changed you should be good to go. If the API has changed you should be able to look up the new call on MSDN and use the posts about CreateProcessA() as a model for that.

Hope this helps…

Subject: You can still use Shell.

To launch a file you would do something like this:

“cmd.exe /C start /B example.txt”

Command window will appear for a split second before launching the application associated with the file you want to open.

Subject: Launch File

You can use the CreateObject Method.