Page 2 sur 2

Re: attachement d'un fichier dans un document notes

MessagePublié: 10 Juin 2003 à 06:35
par Stephane Maillard
Bonjour,Il existe aussi L.C.L. à l'adresse suivante :http://www.labodev.com/2002/dup/DUlcl/default.aspEt aussi un projet que je viens de lancer R.S.L.C.L. Base Notes de gestion de sources en Lotus Notes :http://www.rixy-software.com/download.php?op=geninfo&did=7[%sig%]

Re: attachement d'un fichier dans un document notes

MessagePublié: 18 Juin 2003 à 18:00
par Manu
Bonjour,Merci pour votre script, je cherche à faire la même chose mais avec des fichiers importés en tant qu'objet et non pas attachés. Avez-vous une idée ?Merci d'avance.

Re: attachement d'un fichier dans un document notes

MessagePublié: 18 Juin 2003 à 18:00
par Manu
Bonjour,Merci pour votre script, je cherche à faire la même chose mais avec des fichiers importés en tant qu'objet et non pas attachés. Avez-vous une idée ?Merci d'avance.

Re: attachement d'un fichier dans un document notes

MessagePublié: 19 Juin 2003 à 12:35
par Stephane Maillard
Bonjour,Dim workspace As New NotesUIWorkspaceDim doc As NotesDocumentDim uidoc As NotesUIDocument Dim handle As VariantSet uidoc = workspace.CurrentDocumentSet doc = workspace.CurrentDocument.DocumentCall uidoc.GotoField( "testrtf" ) call uidoc.CreateObject _("MyName","","c:\temp\WordTemplates\test.doc")Par contre je n'est rien trouvé pour l'affichage en forme d'icône, on est obligé de la faire avec le clic droit sur le fichier "Display as -> icon", sur Notes.net il dise que pour l'affichage en icône il utilisé les attachements.[%sig%]

Re: attachement d'un fichier dans un document notes

MessagePublié: 19 Juin 2003 à 13:52
par Manu
Bonjour,Merci beaucoup pour ces infos, en effet cela fonctionne par contre j'ai encore quelques problèmes :Sur cette ligne : call uidoc.CreateObject ("MyName","","c:\temp\WordTemplates\test.doc")J'essaye de faire passer la variable sCheminAndFichier (que vous connaissez je crois, elle vient de votre code aussi) et ça ne fonctionne pas. Pourtant en affichant a l'écran le contenu de la variable on a bien un truc genre C:\test.doc Sinon à quoi correspond le second paramètre vide "" ?C'est dommage pour l'affichage sous forme d'icone, pensez-vous que ce soit vraiment impossible, peut-il y avoir un espoir ? Merci d'avanceCordialementEmmanuel

Re: attachement d'un fichier dans un document notes

MessagePublié: 19 Juin 2003 à 14:03
par Stephane Maillard
Re,In a document in Edit mode, creates an OLE object in the current rich text field.Remarque CreateObject is not supported under OS/2, under UNIX, and on the Macintosh.Defined inNotesUIDocumentSyntaxSet handleV = notesUIDocument.CreateObject( [ name$ [ , type$ _ [ , filePath$ ] ] ] )Parametersname$String. Optional. The name you want to use to refer to the object.type$String. Optional. The type of object you want to create. The type you specify must correspond to an entry in the OLE registry and is case-sensitive. The method creates an empty instance of the specified object type. If you specify a type, you must omit the filePath$ parameter.filePath$String. Optional. The path and file name of the source document you want to use to create an object. The method creates an object from the file. If you specify a file path, you must specify an empty string ("") for the type$ parameter.Return valuehandleVVariant. A handle to the OLE object.UsageYou must specify either a type$ or a filePath$, but not both. If you specify a filePath$, you create the object in a rich text field. You must, however, code a GetObject statement to give LotusScript a handle on the object.The current document must be open in Edit mode and the cursor must be in an editable rich text field.With no parameters, this method displays the Create Object dialog box, which allows the user to select the object to create.Exemple :This script creates a new, blank Lotus 123 worksheet object in the Description field of the current document. Lotus123.Workbook.97 must be in the OLE registry.Dim workspace as New NotesUIWorkspaceDim uidoc as NotesUIDocumentSet uidoc = workspace.CurrentDocumentCall uidoc.GotoField( "Description" )Call uidoc.CreateObject("Quarterly Reports", "Lotus123.Workbook.97")[%sig%]

Re: attachement d'un fichier dans un document notes

MessagePublié: 19 Juin 2003 à 15:17
par Manu
Ok merci ça fonctionne en fait le problème vient d'ailleurs.Via le script je ne peux importer que des extensions "classiques" (doc, xls, jpg) j'ai pas tout essayé mais ces trois la fonctionnent en tout cas.Par contre un .zip, un .tif, un .sig un .wk4 etc, ça ne fonctionne pas. Mais ça fonctionne parfaitement via le menu (Create / Object / Object From file etc ...)Une idée ? Est-ce normal ? Sinon pour le "Display as icon" toujours pas de piste ? Le problème en le laissant comme ça, c'est qu'après avoir fait modifié une fois sur la fiche, le fichier s'ouvre dans le document lotus. Ce qui n'est pas le cas en "display as icon". Et vu que j'ai 12500 fichiers à transferer, je préfererais utiliser un truc automatique ... Merci

Re: attachement d'un fichier dans un document notes

MessagePublié: 19 Juin 2003 à 16:44
par Manu
J'ai trouvé ceci mais je ne m'y connais pas assez pour transformer ça en lotus script et surtout pour savoir si ça répond à mon besoin d'affichage sous forme d'icone ? Connaissez-vous ce truc ? Comment peut-on l'utiliser en lotus script ?MerciObjectDisplayAs Displays the Display As dialog box, which lets you change the display settings of the selected OLE object.Note ObjectDisplayAs is not supported under OS/2 or UNIX, or on the Macintosh.Syntax@Command( [ObjectDisplayAs] )UsageAn OLE object must be selected.