60 pts.
 Rename Notes Location Document
Is there a way to rename Notes Location Documents. I would just like to rename the INTERNET option to my company name. I already have the scrip that delete the other standard Notes client location document.

Software/Hardware used:
ASKED: June 4, 2008  7:15 PM
UPDATED: June 25, 2008  2:10 PM

Answer Wiki:
Go into your personal name & address book. Select the view Locations, find the document with the title "Internet". Edit the document and change it to the value you wish.
Last Wiki Answer Submitted:  June 5, 2008  10:04 pm  by  BrianMahoney   25 pts.
All Answer Wiki Contributors:  BrianMahoney   25 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If you have script to delete the others, you should be able to test for the document that you want to rename. Then just change its Name field.

If doc.Name(0) = “Offiice” then ‘ the sub-sero reference is needed here
doc.name = “My Company” ‘ the sub-zero reference cannot be used here.
End if

 3,845 pts.

 

Could you be more specific? as to what you mean by: “See below”
——————————————————————————————–
Then just change its Name field.

If doc.Name(0) = “Offiice” then ‘ the sub-sero reference is needed here
doc.name = “My Company” ‘ the sub-zero reference cannot be used here
—————————————————————————————————-

I don’t get what your refering to.

 60 pts.

 

This is the scrip i’m using. What I would like to do is delete all locations and somehow rename the OFFICE location to HNRGMAIL. Please see my script below and make the changes you see fit and repost… I would appreciate it a million.

Dim viewLocations As NotesView
Dim docLocation As NotesDocument
Dim item As NotesItem
Dim vec As NotesViewEntryCollection
Dim ve As NotesViewEntry

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.GetDatabase(“”, “names.nsf”)
Set doc = db.CreateDocument
doc.Type = “Connection”
doc.ConnectionType = “Local Area Network”
doc.Destination = “HNRGMAIL”
doc.LanPortName = “TCPIP, COM1, COM2, COM3, COM4″
doc.ConnectionLocation = “HNRGMAIL”
doc.OptionalNetworkAddress = “*”
doc.Form = “local”
Call doc.ComputeWithForm(False, False)
Call doc.save(True, True)
Msgbox “Your (HNRGMAIL) Location Connection Document was Created”

Set db = session.GetDatabase(“”, “names.nsf”)
Set doc = db.CreateDocument
doc.Type = “Connection”
doc.ConnectionType = “Network Dialup”
doc.Destination = “HNRGMAIL”
doc.LanPortName = “TCPIP, COM1, COM2, COM3, COM4″
doc.ConnectionLocation = “Home (Network Dialup)”
doc.OptionalNetworkAddress = “165.71.63.84″
doc.Form = “local”
Call doc.ComputeWithForm(False, False)
Call doc.save(True, True)
Msgbox “Your (Home Dial-up) Connection Document was Created”

Set session = New NotesSession
Set dbNAB = session.GetDatabase(“”, “names.nsf”)
Set viewLocations = dbNAB.GetView(“Locations”)
Set vec = viewLocations.AllEntries
For k = 1 To vec.Count
Set ve = vec.GetNthEntry(k)
Set docLocation = ve.Document
Select Case docLocation.Name(0) = “HNRGMAIL”
doc.name = “HNRGMAIL”
Case “HNRGMAIL”
docLocation.ReplicationEnabled = “1″
docLocation.ReplicateImmediate = “0″
docLocation.ReplicateAtStart = “0″
docLocation.PromptAtStart = “0″
docLocation.Schedule = “12:01:00 AM – 11:59:00 PM”
docLocation.Intervals = “4”
docLocation.Enabled = “1″
docLocation.ReplicateAtEnd = “0″
Set item = docLocation.ReplaceItemValue(“WebRetriever”, “2″) ‘from the test
docLocation.WeekDays = Null
For q = 1 To 7
If (docLocation.HasItem(“WeekDays”)) Then
Set item = docLocation.GetFirstItem(“WeekDays”)
item.AppendtoTextList Cstr(q)
Else
docLocation.WeekDays = Cstr(q)
End If
Next

Case “HNRGMAIL”
docLocation.ReplicationEnabled = “1″
docLocation.ReplicateImmediate = “0″
docLocation.ReplicateAtStart = “0″
docLocation.PromptAtStart = “0″
docLocation.Schedule = “12:01:00 AM – 11:59:00 PM”
docLocastion.Intervals= “4”
docLocation.Enabled = “1″
docLocation.ReplicateAtEnd = “0″
Set item = docLocation.ReplaceItemValue(“WebRetriever”, “2″) ‘from the test
docLocation.WeekDays = Null
For q = 1 To 7
If (docLocation.HasItem(“WeekDays”)) Then
Set item = docLocation.GetFirstItem(“WeekDays”)
item.AppendtoTextList Cstr(q)
Else
docLocation.WeekDays = Cstr(q)
End If
Next

Case “Home (Network Dialup)”
docLocation.ReplicationEnabled = “0″
docLocation.ReplicateImmediate = “0″
docLocation.ReplicateAtStart = “0″
docLocation.PromptAtStart = “0″
docLocation.Schedule = “08:30:00 AM – 10:00:00 PM”
docLocation.Enabled = “1″
docLocation.Interval = “0″
docLocation.ReplicateAtEnd = “0″
Set item = docLocation.ReplaceItemValue(“WebRetriever”, “2″) ‘from the test
docLocation.WeekDays = Null
For q = 1 To 7
If (docLocation.HasItem(“WeekDays”)) Then
Set item = docLocation.GetFirstItem(“WeekDays”)
item.AppendtoTextList Cstr(q)
Else
docLocation.WeekDays = Cstr(q)
End If
Next

Call docLocation.Save(True, False)
Case “Home (Notes Direct Dialup)”
docLocation.RemovePermanently(True)
Case “Island (Disconnected)”
docLocation.RemovePermanently(True)
Case “Travel (Notes Direct Dialup)”
docLocation.RemovePermanently(True)
Case “Office”
docLocation.RemovePermanently(True)
Case “Internet”
docLocation.RemovePermanently(True)

 60 pts.

 

In order to modify location documents then every user has to run the script which can be done by sending an email with a preprogrammed button, This needs careful thought before you do this especially if you are considering sending a button that deletes all existing location documents.

This sort of high-handed action is likely to upset users a great deal if they have already customised their location documents, by all means create a standard new one but give the users a choice rather than installing automatically unless you consult widely beforehand.

 190 pts.

 

Broxy, or anyone else. Based on the script I posted above it ther a way to do this and If so can you please repost .

Thanks

 60 pts.

 

In the script you posted, change this case

Case “Internet”
‘docLocation.RemovePermanently(True) ‘mark at front of line disables it. you can delete instead.
Locationdoc.name = “My Company name”
Call docLocation.Save(True, False)

 3,845 pts.

 

Brooklynegg, I tried what you suggested but it didn’t work. Any other suggestions? Please reply to this blog… Thanks a million

 60 pts.

 

My mistake. I wrecked the document object name. Did you notice and fix it and it still failed? If not do this and let me know.

Case “Internet”
‘docLocation.RemovePermanently(True) ‘mark at front of line disables it. you can delete instead.
docLocation.name = “My Company name”
Call docLocation.Save(True, False)

 3,845 pts.