Da un articolo in rete, se si vuole far
eseguire un suono direttamente da un client Lotus Notes è possibile utilizzare
il metodo Playtune della classe NotesUIWorkspace.
Quetso metodo però richiede in INPUT il percorso del file residente sul
disco da eseguire. Per ovviare a tale problema è possibile utilizzare L'OLE.
1. Aprire
un docuemnto in modalità Modifica e posizionare il cursore sul campo rich
2. Scegliere
dai menù a tendina Create-->Object
3. Scegliere
l'opzione "Object from file" e selezionare un file .WAV
4. Mettere
uno spazio dopo l'icona dell'allegato e scegliere dal menù a tendina Create-->Hostspot-->Button
5. Nominare
il bottone "Esegui Suono"
6. Nel
formula editor, cambiare il linguaggio in Lotus Script e mettere il seguente
codice:
******************************************************************
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Set doc = ws.CurrentDocument.Document
Forall obj In doc.EmbeddedObjects
'** this will attempt
to play all Sound Recorder objects
If (obj.Class =
"SoundRec") Then
Call obj.DoVerb("&Play")
End If
'** this will attempt
to play a specific object (use whatever
'** name you used
in step 4 above)
'If (obj.Name =
"MySound") Then
'
Call obj.DoVerb("&Play")
'End If
End Forall
******************************************************************
7. Infine salvare il documento
Eseguire un File Wav da un Rich Text
- 04/27/2005
- 0 commenti
0 Commenti:
Nessun Commento Trovato