Solved

Change location doc to use IE inside Notes

Posted on 2003-11-03
10
426 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Krugar
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 13

Accepted Solution

by:
CRAK earned 250 total points
Comment Utility
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
Comment Utility
Thanks Crak, I'll give it a go.

Thanks for your help!
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
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
Comment Utility
The detail was enough to show me what I wanted to know :)

Thanks!
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
;-)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

  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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now