How to change de value of "This mail file belongs to:" vía LS

If somebody can send me an example that would be great!!!Thanks a lot,

Juan

Subject: How to change de value of “This mail file belongs to:” vía LS.

Sorry, no code to hand, but what you need to do is to get hold of the mail file (as a Notesdatabase), then get hold of the “calendarprofile” profile document (use ‘GetProfileDocument’).

On the “calendarprofile” profile document you will see a field called “Owner” - This is the one you need to change (remember to write the new name in Canonical format).

Subject: RE: How to change de value of “This mail file belongs to:” vía LS.

Here’s a little piece of code I wrote. You could use the getdbdirectory to loop through an entire server…that’s how we’re actually doing it.

take care,

Mike

Dim Testdb As New NotesDatabase( “”, “” )

Call Testdb.Open( “[YourServer[”, “[Your.nsf]” )

'Get Profile Documents:

Set Mailprofile = Testdb.GetProfileDocument (“inotesprofile”)

Set Calprofile = Testdb.GetProfileDocument (“calendarprofile”)

If Not Mailprofile Is Nothing Then

MailSave = 0

’ we use if statements to increase speed…this makes sure we don’t SAVE unless needed

If mailprofile.mailsaveopt <> 2 Then

mailprofile.mailsaveopt = 2

Call mailprofile.save(True, True)

End If

End If

If Not Calprofile Is Nothing Then

CalSave = 0

If calprofile.autoremovefrominbox <> 1 Then

Calprofile.autoremovefrominbox = 1

CalSave = 1

End If

If CalProfile.owner <> CalProfile.theHiddenOwner Then

If CalProfile.theHiddenOwner(0) = “” Then

’ this is a new database…set the hidden owner so we can look it up later if needed

Calprofile.theHiddenOwner = CalProfile.Owner(0)

Else

’ someone changed the owner…set it back to theHiddenOwner

Calprofile.owner = CalProfile.theHiddenOwner(0)

CalSave = 1

End If

End If

If CalSave = 1 Then

Call Calprofile.save(True, True)

End If

End If

Subject: RE: How to change de value of “This mail file belongs to:” vía LS.

James, thank you very much for your help.Best regards,

Juan M.