Home > Domino Tips > Administrator > E-mail > Upgrading Mail Folders After Running The Convert Task
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

E-MAIL

Upgrading Mail Folders After Running The Convert Task


Todd Harris
10.03.1999
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


After converting mail files to R5 with the server Convert task, existing mail
folders are left with their existing design.

The following agent script allows an administrator to finish the upgrade
process by also upgrading the design of existing folders.

The code could also be modified to make it the user's responsibility to run the
agent.

Code

Sub Initialize
Dim session As New NotesSession
Dim db As New NotesDatabase("","")
Dim dViewDesign As NotesDocument
Dim itTemp As NotesItem
Dim vwOld As NotesView
Dim vwNew As NotesView
Dim vecMove As NotesViewEntryCollection
Dim sMFile As String
Dim iReturn As Integer
Dim sUid As String
Dim sFolder As String
Dim sMailServer As String

sMailServer="Mail/Test"

sMFile=Inputbox$("Enter the filename for the Mail file you would like to
upgrade.", "Upgrade Mail Folders","mail")

If db.Open(sMailServer,sMFile) Then
If Lcase(db.DesignTemplateName)<>"stdr50mail" Then
Print "Design Template Error..."+db.DesignTemplateName
Exit Sub
End If

Forall v In db.Views

If v.IsFolder Then
sFolder=v.Name
If sFolder="Group Calendars" Or sFolder="Rules" Or sFolder="Meetings" Then
'Skip these folders
Elseif Left$(sFolder,2)="($" And Right$(sFolder,1)=")" Then
'Skip these folders
Else
iReturn=Messagebox ("Upgrade " & sFolder & " folder?", 3, "Upgrade Mail
Folders")
If iReturn=2 Then
Exit Sub
Elseif iReturn=6 Then

sUid=v.Universalid
Set dViewDesign=db.Getdocumentbyunid(sUid)

'Rename Folder
Set itTemp=dViewDesign.ReplaceItemValue("$Name",sFolder & "--TempCopy")
Set itTemp=dViewDesign.ReplaceItemValue("$TITLE",sFolder & "--TempCopy")
Call dViewDesign.save(True,False)

'Create New Folder with original name
Call db.EnableFolder(sFolder)
Set vwNew=db.GetView(sFolder)

'Move existing documents into new folder
Set vecMove=v.AllEntries
Call vecMove.PutAllInFolder(sFolder)
Call vecMove.RemoveAllFromFolder(sFolder & "--TempCopy")

'Delete old folder
Set vwOld=v
Call vwOld.Remove
End If
End If

End If
End Forall
Print "Done upgrading mail folders - " + sMFile
Else
Messagebox "Mail file " + sMFile + " not found.", 0, "Upgrade Mail Folders"
End If

End Sub

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
E-mail
Secure Lotus Notes/Domino 8.x from mail to unknown recipients
Domino server setting and email policy tricks admins must know
Top 10 Lotus Notes/Domino administration tips of 2008
Can Lotus Notes/Domino and Microsoft SharePoint play nice together?
Using Formula language code to sort Lotus Notes messages by subject
LotusScript action button manages Lotus Notes mail files
Exploring Lotus Notes Domino 8.0.1 and beyond
LotusScript agent moves tagged spam email to junk mail folder
Send SMS text messages between Lotus Notes 7 and mobile devices
Update to Exchange Server 2003 Connector for Lotus Notes

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts