Solved

Add Database Mail Icon to Workspace with LotusScript

Posted on 2011-03-23
9
1,434 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
Comment Utility
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
Comment Utility
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
Comment Utility
Isn't Call notesUIWorkspace.AddDatabase( server$ , filename$ ) what you're looking for?
0
 
LVL 1

Author Comment

by:ajl7519
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 500 total points
Comment Utility
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
Comment Utility
Sorry, I should have mentioned to replace "MIS390" above with your actual Domino server name.
0
 
LVL 1

Author Comment

by:ajl7519
Comment Utility
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
Comment Utility
Worked perfect. Thanks so much.
0
 
LVL 22

Expert Comment

by:Bill-Hanson
Comment Utility
Glad to help!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Recent Contacts - Lotus Notes 10 601
Lotus notes email code 6 104
Notes > Exchange calendar issues 5 56
Add a cc field to email code 3 93
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

12 Experts available now in Live!

Get 1:1 Help Now