Solved

How do I create a toolbar button that will remove a folder?

Posted on 2008-06-25
4
277 Views
Last Modified: 2013-12-18
How do I create a button on my toolbar that I can click to remove (delete) the currently selected folder? I understand how to create a custom toolbar but do not how to create a button that will perform the remove folder action.

I am running Lotus Notes client 8.0.1.
0
Comment
Question by:zipwilly05
[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
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 21870094
You'll have to use LotusScript for this.

Here's a function that will remove a folder from the current database.  Just change the action type to LotusScript and paste this code into the 'Declarations' module.   Then call the function from the action's click event like this:

Call RemoveFolder("Folder Name")
Sub RemoveFolder(Byval folderName As String)
	
	Dim sess As New NotesSession
	Dim db As NotesDatabase
	Dim folder As NotesView
	Set db = sess.CurrentDatabase
	Set folder = db.GetView(folderName)
	If (folder Is Nothing) Then
		Msgbox "The folder does not exist!"
	Else
		Call folder.Remove
		Set folder = db.GetView(folderName)
		If (folder Is Nothing) Then
			Msgbox "The folder has been removed"
		Else
			Msgbox "Unable to remove the folder!"
		End If
	End If
	
End Sub

Open in new window

0
 

Author Comment

by:zipwilly05
ID: 21878551
I have not written a LotusScript before.

How do I tie the execution of this script to toolbar button? Do I paste something into the Formuia box of the dialog that appears when I create a new toolbar button (see attachment)?

Where is the action that you reference in your response?
snap033.bmp
0
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 50 total points
ID: 21878681
Sorry.  I answered assuming you were adding a button to an Action Bar in a Notes application.

There is no solution for what you are trying to do since you can only use @Formula in the toolbar and @Formula does not have any fuctions for removing a folder.

I usually just right-click on the folder name and select "Remove Folder".
0
 

Author Closing Comment

by:zipwilly05
ID: 31470761
I did not realize that command was available. Your answer is most helpful.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

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