What is the best way to open a document that is not listed in the active view?

Let say, I need to open a document that is not listed in the active view and I need to do this from an action button. The document was created with a form I customize myself

Subject: What is the best way to open a document that is not listed in the active view?

You can generate and use a notes url in formula as long as you have the unid or the key to open the doc from a specified view. eg

@URLOpen(“notes://servername/dbpath/0/unid”)

or

@URLOpen(“notes://servername/dbpath/viewname/dockey”)

Subject: What is the best way to open a document that is not listed in the active view?

It can be done with the ‘flashing’ someone else mentioned, in formula language, e.g. my button opens a word attachment on a db that isn’t even open. It then closes down the document, view, and db, so when the user is return to notes, it displays the email that had it in…Also I decided to minimize notes, because I cannot make notes switch focus to word (you can with other applications, e.g. powerpoint, this is a disadvantge that effects word only)

@Command([FileOpenDatabase];“servername.company.com”:“CRM\SIEBELUAT.NSF”);

@IfError(@DbLookup(“”:“NoCache” ; “servername.company.com”:“CRM\SIEBELUAT.NSF”; “RTLkupByKey”; “CompanyName UAT Testing Guide”; 1);

@Return(@Prompt([Ok];“Unavaliable”;“Sorry - no help documentation exists for this action”)));

@Command([OpenView]; “RTLkupByKey”;“CompanyName UAT Testing Guide”);

@Command( [OpenDocument]);

@If(@Command( [AttachmentLaunch] );

@Do(

@Command([FileCloseWindow]);

@Command([FileCloseWindow]);

@Command([FileCloseWindow]);

@Command( [WindowMinimizeAll] ));

@Return(“”))

Subject: LotusScript is the only way

You would have to use LotusScript. You could also use @commands to open up the view that has the document, then the OpenDocument @command and then close the view that held the document. This would cause some “flashing” on the monitor but would work.

Howard

Subject: RE: LotusScript is the only way

How do you close the view that was open ? (the one that allow you to open the document)

I managed to do it like this:

@SetTargetFrame(“AGECDRE_0001_CNT”);

to open the view in the frame I want

@Command( [OpenView] ; “VUE_0004” );

open the view where the document is in

@SetTargetFrame(“AGECDRE_0001”);

set back the frame as before

@Command([OpenDocument];“”;uniddoc)

open the form

but then how and where will I be able to close the “VUE_0004”