Solved

Change location doc to use IE inside Notes

Posted on 2003-11-03
10
432 Views
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!
0
Comment
Question by:Krugar
  • 6
  • 4
10 Comments
 
LVL 13

Expert Comment

by:CRAK
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!
0
 

Author Comment

by:Krugar
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 )

Cheers!
0
 
LVL 13

Expert Comment

by:CRAK
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....
0
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.

 

Author Comment

by:Krugar
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!
0
 
LVL 13

Expert Comment

by:CRAK
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....
0
 
LVL 13

Accepted Solution

by:
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 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
            Else
                  Set Doc = View.GetNextDocument(Doc)
            End If
      Loop
      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"
      Else
            ' 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
0
 

Author Comment

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

Thanks for your help!
0
 
LVL 13

Expert Comment

by:CRAK
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!
0
 

Author Comment

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

Thanks!
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9682322
;-)
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 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