Writing a Toolbar Icon that calls a dialogbox

I have an interesting problem.

I want to write some code in a ToolBar Icon that get a handle to the document that a user is selecting (in whatever db they are in) and then open that document up in a dialogbox whose code is in a different db. I know this can be down because I have NoteMan and Teamstudio and they are doing things like this, but I can’t figure it out.

Any help would be greatly appreciated.

Subject: RE: Writing a Toolbar Icon that calls a dialogbox

create a form in the other database. in the form queryopen read information about the target document from an ini variable, copy the document into a temporary doc in the other db (don’t save the new doc). open that in the dialogbox. continue = false.