Search DominoPower's 11,425 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How to audit your address book: more code (continued)

The last check of all is whether there is a forwarding address. I'm personally not in favor of the use of forwarding addresses. Why? Well, do you want corporate mail being forwarded to Hotmail? It seems that many people have their mail forwarded when they go on holiday, or just have it sent to their home email address. I personally go on holiday when I'm on holiday, and don't check my mail at all. And I'm really not keen on corporate mail being forwarded on to potentially insecure email systems. If it's important to the company that people can reach their email when they're away from their desks, then the company should, in my opinion, either give people a laptop and Notes to travel with or set up a secure corporate Webmail/iNotes portal. Forwarding mail to a public system is, in my mind, totally unacceptable. Rant over. It's your call.

'9. Forwarding addresses
If pers.mailaddress(0) <> "" Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Forwarding Address specified: " & pers.mailaddress(0))
Call reportdocbody.addnewline(1)
sev(2) = True
End If

Now we determine the highest severity we encountered in checking this person record.

'do the counts
count(0) = count(0) + 1
If sev(1) = True Then
count(1) = count(1) + 1
Elseif sev(2) = True Then
count(2) = count(2) + 1
Elseif sev(3) = True Then
count(3) = count(3) + 1
End If

End If 'it's a person record
Set pers = users.getnextdocument(pers)

Loop

And finally we complete the report and email it.

Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("Total number of Person records examined: " & count(0))
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Highest Severity:")
Call reportdocbody.addnewline(1)

Call ReportDocBody.appendtext("...Severity 1: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(1))
Call reportdocbody.addnewline(1)

Call ReportDocBody.appendtext("...Severity 2: ")
Call reportdocbody.addtab(1)

Call reportdocbody.appendtext(count(2))
Call reportdocbody.addnewline(1)

Call ReportDocBody.appendtext("...Severity 3: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(3))
Call reportdocbody.addnewline(1)

Call ReportDocBody.appendtext("...No issues: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(0) - count(1) - count(2) - count(3) )
Call reportdocbody.addnewline(1)

Call reportdoc.send(False)
End Sub

What else could you do?
I said earlier that I would make suggestions for improvement. Here are a few.

The obvious one
Clean up the way the code is run. Add a dialog, either simply via Msgbox, or via a NotesUIWorkspace.DialogBox call to obtain the server name and directory name. You could also allow the user just to specify a server and assume that the directory is called names.nsf unless a value is given. This avoids the need to make code changes to run in a different domain.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
New Notes/Domino Technotes published about Chile's extended daylight saving time
SnnT: How to prevent Google from listing your Sametime Server
How to send someone an email that shows your calendar availability
"The collection has become invalid"
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login