How can I programmatically (in LotusScript) remove a database from the workspace without user interaction?
- Right click on Workspace
- Down to Remove from Workspace
- and Yes to R U sure
I would have thought SendKey would work. I don't know offhand how to send mouse clicks, but there's nothing you can do with the mouse that you can't do with keystrokes (e.g., don't try to click the "Yes" button -- send a "Y" character instead). The approach is described in detail in Removing Lotus Notes/Domino Workspace Icons.
Using macro language @Commands, you can open the workspace window (WindowWorkspace command), open a database to highlight it in the workspace, close the database again, then use FileDatabaseRemove command to remove the still-highlighted database from the workspace. However, I believe the user will still be prompted whether to proceed.
People usually ask this question because they have moved a database and want to get rid of the old links on everyone's workspace. I believe there are other ways of dealing with this, which a database administration expert could tell you -- I can't.