Problems with opendocument

If I use opendocument then I get the error message cannot execute specified commmand

I’ really don’t know what i’m doing wrong.

@Command([OpenDocument];“0”;sleutel)

and sleutel(key) is

@If(frmCopackerProductprod = “”;@Success;@If(@IsError(@DbLookup(“”;“”;“uniekesleutel”; @Text(frmCopackerName +“-”+frmCopackerProductprod);2));“”;@Unique(@DbLookup(“”;“”;“uniekesleutel”; @Text(frmCopackerName +“-”+frmCopackerProductprod);2))))

But he calculates the key perfectly because I use this key in other formula’s and those are working fine.

Can somebody help me please.

Thanks in advance

Subject: problems with opendocument

Where do you use this formula? In a view action button? Is the document you’re searching present in this view?

Groeten,

Joris

Subject: RE: problems with opendocument

No I’m using it in a form on a button

Subject: RE: problems with opendocument

from the help of the OpenDocument @Command:

Usage

A database must be open to a document view and the view must contain the document you want to open.

I’m afraid you’ll have to use LotusScript to achieve your goal …

Subject: problems with opendocument

May seem a silly question. but does “sleutel” definitely resolve to a unique ID? If so, is it in the format required by the @Command?

Subject: RE: problems with opendocument

In the view where it searches the key is the code

@Text(@DocumentUniqueID)

I’don’t really know what you mean with the required format.