Home
TeamSite
Changling the default save as location
Stu_McHugh
I am using Mailsite/Filesite 8 SP1a on Windows XP.
When profiling documents the default save as location is where ever the last document was saved. Is there a way to set the default location to the root of 'My Matters'? I know there have been similar discussions on the message boards but I have not been able to adapt them. Can anyone help?
Many Thanks
Find more posts tagged with
Comments
jny
The last location is stored in this reg key:
[HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\iManExt\BrowseDlg\Last Location]
"Path"="\!nrtdms:0:!session:MYSERVER:!WorkArea:!RecentPages:"
You could remove it then add a different location each time immediately after a document is saved by scripting through the PostOnOK Event Handler.
[filesave.nrs]
==================================
Sub IManFileSaveCmd_PostOnOK(dlg)
' TODO: create a COM server object that does the task of updating the registry key and call it here.
End Sub
==================================
I don't think, however, you can set the last location to MyMatters folder; you could set it to the Matter Worklist though.
The example code in the Technote 53218, specifically the one in ImportDocToSpecifiedLoc.zip, has the following code snippets which demonstrates how to build a last location path to store in the aforementioned key.
[VB]
...
' Constants for building specified location
Const WORKSPACE_NODE = "My Workspaces" ' or "Other Workspaces"; interchangable
Const DELIMITER = "\" ' location path separator
Set oSess = oDMS.Sessions.Add("NTDEVSUPPORT")
oSess.TrustedLogin
' Databases in which to search
oList.Add oSess.PreferredDatabase.Name
Set oContext = New ContextItems
Set oFileSaveCmd = New IManFileSaveCmd
' Assuming the location in the dialog to bring user to is _
' a specified folder named, FolderTestA-a, inside a _
' workspace belonging to the currently logged on user, _
' we'll search for the folder.
' (i.e., \ServerDevelopment\DatabaseTest\My WorkSpaces\
' WorkspaceTest\TabTest\FolderTestA\FolderTestA-a)
' Create search parameters
Set oParams = oDMS.CreateFolderSearchParameters
' Add search criteria
oParams.Add imFolderName, "FolderTestA-a"
oParams.Add imFolderOwner, oSess.UserID
' Search for folder
Set oResults = oSess.WorkArea.SearchFolders(oList, oParams)
' Check oResults
If True = oResults.Empty Then
MsgBox "folder not found."
Exit Sub
End If
' Assuming the first item is the oTarget folder
Set oTarget = oResults.ItemByIndex(1)
' Path, which returns IManFolders collection representing _
' the ancestors of the IManFolder object and including _
' the folder itself, is ordered from the root to the current folder, _
' i.e., the root level folder is ItemByIndex(1).
Set oPath = oTarget.Path
' Build preselected path
For i = 1 To oPath.Count
' Concatenate the Object ID of each folder object in the oTarget's path
strPreSelectedLoc = strPreSelectedLoc & DELIMITER & oPath.ItemByIndex(i).ObjectID
Next i
' The object ID's of oSession and database to which the oTarget folder belongs come first
' in the order of object ID's in the preselected path.
sessID = oTarget.Database.Session.ObjectID
dbID = oTarget.Database.ObjectID
' Concatenate Object ID's to build preselected location
strPreSelectedLoc = DELIMITER & sessID & DELIMITER & dbID & DELIMITER & WORKSPACE_NODE & strPreSelectedLoc
' NOTE: To see how the selected path looks like for any other folder type locations, _
' select a folder location from within a browse dialog, open dialog, or save as dialog.
' Then, go to the following reg key setting to see the resulting string format:
'
' [HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\iManExt\BrowseDlg\Last Location]
' "Path" = "\!nrtDMS:0:!oSession:NTDEVSUPPORT:!WorkArea:!WorkList:"
' (This example shows the last selected path was user's worklist.)
...
Stu_McHugh
Thanks for the help. I have used that PostOnOk event handler and followed on with the code for changing that regkey. You mentioned that you may not be able to the last location to My Matters but you can to the Matter Worklist. Can you let me know reg key string for this as I can't work it out?
jny
It's how I have it up at the top of my previous response; the value for path under the key.
"Path"="\!nrtdms:0:!session:MYSERVER:!WorkArea:!RecentPages:"
Note: MYSERVER should take that name of an actual WorkSite server.
Stu_McHugh
I have tried this but this doesn't default to 'my matters' but just 'matter worklist'. Is it possible to to default it to the my' matters'
Regards
jny
No, unfortunately not -- this again is for bringing you to the Matter Worklist.