Go Premium for a chance to win a PS4. Enter to Win


Change location doc to use IE inside Notes

Posted on 2003-11-03
Medium Priority
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
  • 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....
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


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 1000 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 database.open("", "") ' 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

927 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