OpenPlain can't use variable

While it seems that every other Open… statement works with a variable, OpenPlain does not. It won’t compile. The workaround is to use OpenSecret but requires extra steps to get to the desired point.

This works:

Let lvFile = "Contacts"
openfile lvFile

This does not and gets a compiler error: “Unknown statement: lvFile”

Let lvFile = "Contacts"
openplain lvFile

How about:

Let lvFile = "Contacts"
execute "openplain "+lvFile

But look at all of those extra bytes… :grin:

Yes, that’s another workaround besides open secret.

Inflation!

Ahh, but as it turns out, none of the above are correct. OpenPlain requires no parameters. So the error is in trying to identify the file to be opened.

Openplain is a standalone statement that opens an open file dialog for me to choose the file that I want to open plainly. It even says so in the Help as long as one thinks while reading the Description.

Maybe I was reading while chewing gum.

So OpenSecret is the only way to get there.