Solved

Change location doc to use IE inside Notes

Posted on 2003-11-03
10
433 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
[X]
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
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

751 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