Change location doc to use IE inside Notes

Posted on 2003-11-03
Last Modified: 2010-04-22
We're using r5 &  finally decided to move from Netscape to IE6, however now I have to change the users location docs in names.nsf to use IE6 (within Notes).

Is there an easy way to automate this, preferably in VB6?  If it cannot be automated using vb6, can it be done from a notes server?

I cannot change any templates, and the process must run without user interaction.  It would be completely ideal if they didn't even have to unlock their notes ID file, but I don't know if that's possible.

Thanks in advance!
Question by:Krugar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 13

Expert Comment

ID: 9676986
I'd probably send users an e-mail with a button.

The button could check the value of the environment variable "Location". If will need some string handling, but part of its return value should be found in the view "($Locations)" in the personal NAB (local:names.nsf). On the fond document, you should set the field "WebRetriever" to "2".
LotusScript is probably the easiest, since you may need to loop through location documents and/or fragments of the environment variable to produce a match.

This method DOES have user interaction. As an alternative, you could send the mail in a new type of document (copy of memo), with "include form in document" switched on and the script (from the button) placed in e.g. post open. That would require a design modification, but not neccesarily in a mail file!

Author Comment

ID: 9678746
A button may be what we settle for, but our users are not the best at pressing them (you can lead a horse to water...)

Thus the idea of a VB6 program.  The form modification sounds interesting, could you give me a better idea on how that would work?  (I'm a VB / PHP / SQL programmer )

LVL 13

Expert Comment

ID: 9678910
I'm a Notes developper... not a VB programmer, but Lotusscript is just another basic dialect. Doing the trick in Vb would require access through Notes objects etc... I can't help you with that.
Are you using Notes mail (to support the Lotusscript)? I could write you the code....
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 9678978
Yeah we're using Notes R5 for just about everything, including mail.

I cannot modify the mail template, the powers that be are dead set against it.  However sending a copy of a memo might squeak through.

Anyway searching through the objects Notes exposes is time comsuming, if you wouldn't mind giving me an example of how to find the current location of Names.nsf & then open, update & save the current document (is it a collection?) it would be very helpful.

Thanks in advance!
LVL 13

Expert Comment

ID: 9679219
No need to change any mail template! Any database can be used to send mail!
I'll fix you an example. Might not be today though....
LVL 13

Accepted Solution

CRAK earned 250 total points
ID: 9679809
I used this code in a button.
Place the button on a form called "Memo" in e.g. an empty, local database. Create a document "Memo" and even withoud saving, forward it to your users.... Do switch "store form in document" ON (form properties).

Sub Click(Source As Button)
      Dim Ws As New NotesUIWorkspace
      Dim UIDoc As NotesUIdocument
      Dim Session As New NotesSession
      Dim AddressBooks As Variant
      Dim Database As NotesDatabase
      Dim View As NotesView
      Dim Doc As NotesDocument
      Dim Env As String
      Env = Session.GetEnvironmentString("Location", True) ' retrieve current location from notes.ini
      Env = Strleftback(Env, ",") ' remove username
      Env = Strleftback(Env, ",") ' remove number (?)
      ' Env now holds the location name. Still might contain a comma!
      ' find local, private adressbook
      AddressBooks = Session.AddressBooks ' all personal / public addressbooks
      Forall Book In Addressbooks
            If Book.server = "" And Book.IsPrivateAddressBook Then
                  Set Database = Book
                  Exit Forall
            End If
      End Forall
      If Database Is Nothing Then
            Messagebox "Could not find your local private addressbook." & Chr$(10) _
            & "Please contact the helpdesk", MB_OK + MD_ICONSTOP, "Failure"
            Exit Sub      
      End If
      ' Open addressbook / find location document
      Call"", "") ' open database already assigned
      Set View = Database.GetView("($Locations)") ' beware: experienced translated (dutch) views in earlier releases
      Set Doc = View.GetFirstDocument
      Do While Not Doc Is Nothing
            If Doc.Name(0) = Env Then ' match!
                  Exit Do
                  Set Doc = View.GetNextDocument(Doc)
            End If
      If Doc Is Nothing Then
            Messagebox "Could not make an exact match with you current location: " & Chr$(10) _
            & "Please contact the helpdesk", MB_OK + MD_ICONSTOP, "Failure"
            ' write modifications to locaion document
            Doc.WebRetriever = "2" ' set browser to MSIE
            Call Doc.Save(True, True) ' save document
      End If
      ' Remaining problem: activate location modification
      ' Call Ws.SetCurrentLocation(Env) ' doesn't work yet
      Set UIDoc = Ws.EditDocument(True, Doc)
      Call UIDoc.Save
      Call UIDoc.Close
End Sub

Author Comment

ID: 9680423
Thanks Crak, I'll give it a go.

Thanks for your help!
LVL 13

Expert Comment

ID: 9681787
Haven't you tried it yet? And still awarding points?
Well... this thing workes in notes. Let me know if you manage to get it working in VB. Sounds interesting!
Thanks for the points and good luck!

Author Comment

ID: 9681798
The detail was enough to show me what I wanted to know :)

LVL 13

Expert Comment

ID: 9682322

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here:
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question