Solved

Add Database Mail Icon to Workspace with LotusScript

Posted on 2011-03-23
9
1,445 Views
Last Modified: 2013-12-18
Hello,

I am trying to come up with a button that would use LotusScript to open the Address Book and let the user choose which Mail to open. Once opened I would like the Icon to the Mailbox to appear on the user's workspace.

Basically, I am trying to do the same thing as File>Application>Open when you choose the server and then mail file.

A common request is when user's delegate access to their mail and calendar, they want the icon on the workspace.

Is this possible or would I need to code the mail file/database to open?

Thanks,

A
0
Comment
Question by:ajl7519
  • 4
  • 4
9 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 35202626
Why write code when it's a built-in feature?

1) The Domino Directory has a button for opening a Person's email.  Open Person document, click on "Open Mail File".

2) The Email app has a setting where you add links to others' email.  From Inbox - More (or Tools) \ Preferences.  From the prefs screen - Access & Delegation tab \ Shortcut to Others' Mail tab.
0
 
LVL 1

Author Comment

by:ajl7519
ID: 35202688
Thanks.

That is exactly what they tell the users and I have instructions for doing so, but they insist upon having the icon on their Workspace. When they open the mail via "open another person's mail," it does not place the icon on their Workspace.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 35204923
Isn't Call notesUIWorkspace.AddDatabase( server$ , filename$ ) what you're looking for?
0
 
LVL 1

Author Comment

by:ajl7519
ID: 35206936
Thanks, that is what I have for starters right now. Problem is I want to the user to use the address book and maybe even form field so they can select the mailbox they want added.

Trying to find the way to pull that information once the person is selected and pass it to server and filename variables to the script.

This is what I have now.


Sub Click(Source As Button)
	Dim w As New NotesUIWorkspace
	Call w.AddDatabase( "server", "filename.nsf")
End Sub

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 500 total points
ID: 35207487
Well, here's the code.  Still kind of silly to write custom code for this since the "Open Mail File" button in the directory does add the icon to the workspace.
Dim workspace As New NotesUIWorkspace
	Dim selection As Variant
	selection = workspace.Pickliststrings(PICKLIST_NAMES, False)
	Dim directory As New NotesDatabase("MIS390", "names.nsf")
	Dim users As NotesView
	Dim user As NotesDocument
	Set users = directory.Getview("($Users)")
	users.Refresh
	Set user = users.Getdocumentbykey(selection(0), true)
	Dim server As String
	Dim filepath As String
	server = user.Getitemvalue("MailServer")(0)
	filepath = user.Getitemvalue("MailFile")(0)
	workspace.AddDatabase server, filepath
	workspace.Opendatabase server, filepath

Open in new window

0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 35207498
Sorry, I should have mentioned to replace "MIS390" above with your actual Domino server name.
0
 
LVL 1

Author Comment

by:ajl7519
ID: 35207608
Thanks, I will give it a try. Forgot to mention the Open Mail File button in the Directory is access restricted.
0
 
LVL 1

Author Comment

by:ajl7519
ID: 35207656
Worked perfect. Thanks so much.
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 35207674
Glad to help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

930 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

15 Experts available now in Live!

Get 1:1 Help Now