Skip to main content
BlueMix free trial
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: folders on Mail database after upgrade to notes 7
Charles E. Robinson 18.Sep.06 08:52 PM a Web browser
Notes Client 7.0.1 Windows XP


If there is no template specified for the mail database when the folder is created the prohibit design refresh flag will not be set. I struggled with this for years, then finally created the code below. This will go through your Domino Directory and access every mail file and see if the folders and views in it exist in the template, and update prohibit design refresh flag accordingly. I used this on my own domain before upgrading to ND6 and 6.5 and nobody lost any folders. I'll be running it again before I upgrade to R7. I hope this helps... actually, I should blog this. :)

Sub Initialize
'*** January 21, 2005 - Charles Robinson
'*** Set the Prohibit Design Refresh flag on all non-template views and folders
'*** to prevent a design refresh from overwriting user-created folders
'***
On Error Goto ErrTrap
Dim nLog As NotesLog
Set nLog = New NotesLog("Set Prohibit Design Refresh for Mail")
Call nLog.OpenAgentLog

Dim nSession As NotesSession
Dim nDBNAB As NotesDatabase
Dim nDBMail As NotesDatabase
Dim nDBNTF As NotesDatabase
Dim nVW As NotesView
Dim nDoc As NotesDocument
Dim nDCPeople As NotesDocumentCollection

Set nSession = New NotesSession
Set nDBNTF = nSession.GetDatabase("mail/wmbird", "wmbinot6.ntf", False)
Set nDBNAB = nSession.GetDatabase("mail/wmbird", "names.nsf", False)

Set nDCPeople = nDBNAB.Search({Form = "Person"}, Nothing, 0)
Set nDoc = nDCPeople.GetFirstDocument
Do Until nDoc Is Nothing
Set nDBMail = nSession.GetDatabase("mail/wmbird", nDoc.MailFile(0), False)
If Not nDBMail Is Nothing Then
Forall vw In nDBMail.Views
'See if the view in the mail file exists in the template
Set nVW = nDBNTF.GetView(vw.Name)
'If not set the prohibitdesignrefresh flag
vw.IsProhibitDesignRefresh = (nVW Is Nothing)
End Forall
End If
GetNextDoc:
Set nDoc = nDCPeople.GetNextDocument(nDoc)
Loop

Set nVW = Nothing
Set nDBNAB = Nothing
Set nDBNTF = Nothing
Set nDBMail = Nothing
Set nDCPeople = Nothing
Set nSession = Nothing

Exit Sub

ErrTrap:
Call nLog.LogError(Err, "Unable to modify database " & nDoc.MailFile(0))
'This is necessary to prevent logging an error for every folder and overflowing the agent log
Resume GetNextDoc
End Sub




folders on Mail database after upgr... (Program Tester 15.Sep.06)
. . RE: folders on Mail database after ... (Paul K Smerdon 15.Sep.06)
. . . . RE: folders on Mail database after ... (Gregg Eldred 15.Sep.06)
. . . . . . RE: folders on Mail database after ... (Program Tester 15.Sep.06)
. . . . . . RE: folders on Mail database after ... (Charles E. Robi... 18.Sep.06)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite