i want to move a document from one folder to another using lotus script. i don’t know the current folder in which the document is lying and also if the folder in which the document needs to be moved to does not exist, it should be created.
This is a requirement i need to implement in my mail db. A document comes as stored form with a button in it. Clicking on this button in the document should move this document to the folder.
i have tried possiblities like enable folder, folder methods etc. but no proper out put.
thanks in adv.
Subject: moving document to another folder
It shouldn’t matter what folder the document is currently in, if you are manually moving it by clicking a button in it.
Look at NotesDocument.PutInFolder. From the Help:
"Call notesDocument.PutInFolder( folderName$ [, createonfail ] )
Parameters
folderName$
String. The name of the folder in which to place the document. The folder may be personal if the script is running on the workstation. If the folder is within another folder, specify a path to it, separating folder names with backward slashes, for example, “Vehicles\Bikes”.
createonfail
Boolean. Optional. Specify True so that a folder will be created if it does not exist.
Usage
If the document is already inside the folder you specify, PutInFolder does nothing. If you specify a path to a folder, and none of the folders exists, the method creates all of them for you. For example:
Call doc.PutInFolder( Vehicles\Bikes )
If neither Vehicles nor Bikes exists, PutInFolder creates both, placing the Bikes folder inside the Vehicles folder.
This method cannot add the first document to a folder that is “Shared, Personal on first use.”
Subject: RE: moving document to another folder
i know the putinfolder option.but how do i delete the document from the existing folder