OpenNTF.org - Creating a document selecting
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Creating a document selecting autocalculated forms from a listbox 
Rating:
Not Rated Yet 
Contributor:
Juan Francisco Ruiz Fernandez 
Category:
Lotusscript 
Type:
Example Code 
Notes Version:
R5.x, R6.x 
Last Modified:
28 Dec 2004 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
Sub Click(Source As Button)

Dim nses As New NotesSession
Dim nwrk As New NotesUIWorkspace

Dim ndat As NotesDatabase
Dim ndoc As NotesDocument
Dim nfrm As NotesForm

Dim vFormSelected As Variant

Dim acForms() As String

Dim iCon As Integer

Set ndat = nses.CurrentDatabase

Redim acForms( Ubound(ndat.forms))

iCon = 0
Forall f In ndat.forms
acForms(iCon) = f.Name
iCon = iCon + 1
End Forall

vFormSelected = nwrk.Prompt(PROMPT_OKCANCELLIST,"Compose document","Choose a form:",acForms(0),acForms)
If Not Isempty(vFormSelected) Then
Call nwrk.ComposeDocument("","",Cstr(vFormSelected))
End If
End Sub

Usage / Example
1 - Create a action buttom in any view of your database.
2 - Put the code located in "Code / Description" in the Click Event of the action buttom created in point 1.

P.D : Sorry, I'm spanish. My english is awfull ..... :-/
 Comments

No documents found

 Add your comment!