Solved

Add Database Mail Icon to Workspace with LotusScript

Posted on 2011-03-23
9
1,455 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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
 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

  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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 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