Simon,
You would run the function on an encrypted password string to get the true password into a variable before it is used in the OpenCatalog method. As in:
pwd$ = Mix(
encrypted string,"D"
Then open the catalog with:
ImpApp.OpenCatalog "MyCat","UserClassID",,"DB_ID",pwd$
The function takes two arguments. The first is the string to process, and the second is either an "E" or "D" (for encrypt/decrypt). In the macro you would usually use a "D", but you can put the password in in clear text, use the "E" option, and put a breakpoint in after it is called to see what the encrypted string would be. Then replace the clear text with the encrypted string, change the option back to "D", and check that the returned string is properly decrypted.
This example is one of the few times I have posted complete macro code, just because so many of Impromptu users are novices to this area, and because I don't want Cognos to get a black eye on security complaints because of clear text passwords.
Send me an email (check my profile for my address) if you need further help, as I'm hesitant to put too much in the open forum on this topic, just as a precaution.
Hope this helps,
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"