Home > Domino Tips > Administrator > Address Book > Button Script To Add Server Connection Documents To Personal Address Book
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADDRESS BOOK

Button Script To Add Server Connection Documents To Personal Address Book


Bob Pratico
11.17.1999
Rating: -4.33- (out of 5)


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


This script can be used in an Action Button sent to users in order for them to
add server connection documents to their Personal Address Book. This script
will first alert the user to what is about to happen, then check for the
existence of one of two connection documents, add any connection documents as
appropriate, and notify the user how many connection documents were added.

Sub Click(Source As Button)
Messagebox "This action will automatically add Connection Documents to the
Huntsville servers if they do not already exist in your Personal Address
Book.", 0 + 64, "Huntsville Connection Documents"
Dim db As New NotesDatabase("" , "names.nsf")
Dim view As NotesView
Dim doc As NotesDocument
Dim success As Variant
Dim connect As NotesDocument
Dim State As Integer
State = 0

Set view = db.GetView("Connections")
Set doc = view.GetFirstDocument
While Not (doc Is Nothing)
If doc.Destination(0) =
"Server1Name(i.e.CN=RSCHUN-DH01/OU=RES/O=Raytheon/C=US)" Then
Goto NextServer
Else
Set doc = view.GetNextDocument(doc)
End If
Wend

Set connect = db.CreateDocument
connect.form = "local"
connect.type = "Connection"
connect.destination = "Server1Name(i.e.,
CN=RSCHUN-DH01/OU=RES/O=Raytheon/C=US)"
connect.lanportname = "TCPIP"
connect.connectiontype =

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


RELATED CONTENT
Address Book
Formula language button manages Deny Access list searches
Find a Lotus Notes user within NAB Deny Access groups
Synchronize LinkedIn contacts with Lotus Notes Domino
How to correct Lotus Notes public key mismatches in four easy steps
Creating a Lotus Notes Personal Address Book replica
Admin user unable to create NAB
@Transform formula for use in R6
Change NAB while maintaining integrity of documents
NAB: A key piece of the Domino administration puzzle
Build an extended directory catalog

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


"0"
connect.optionalnetworkaddress = "Server1IPAddress (i.e., xxx.xx.xx.xx)"
success = connect.ComputeWithForm( False, False)
Call connect.Save(True,True)
State = State + 1


NextServer:
Set view = db.GetView("Connections")
Set doc = view.GetFirstDocument
While Not (doc Is Nothing)
If doc.Destination(0) = "Server2Name" Then
Goto Alert
Else
Set doc = view.GetNextDocument(doc)
End If
Wend

Set connect = db.CreateDocument
connect.form = "local"
connect.type = "Connection"
connect.destination = "Server2Name"
connect.lanportname = "TCPIP"
connect.connectiontype = "0"
connect.optionalnetworkaddress = "Server2IPAddress(xxx.xx.xxx.xx)"
success = connect.ComputeWithForm( False, False)
Call connect.Save(True,True)
State = State + 1


Alert:
Select Case State
Case 0
Messagebox "Your Personal Address Book already has both Server Connection
Documents; no new connection documents were created." , 0 + 64 , "Finished!"
Case 1
Messagebox "Your Personal Address Book already had one of the Server
Connection documents; one new connection document was created." , 0 + 64,
"Finished!"
Case 2
Messagebox "Two new server connection documents were created in your Personal
Address Book." , 0 + 64, "Finished!"
End Select

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.




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