3 messages in org.openoffice.fr.progRE: [prog] For each ...
FromSent OnAttachments
jean-paul mestersDec 18, 2005 12:49 pm 
christianwtdDec 18, 2005 1:18 pm 
jean-paul mestersDec 21, 2005 12:23 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [prog] For each ...Actions...
From:jean-paul mesters (ji@mesters.org)
Date:Dec 21, 2005 12:23:49 am
List:org.openoffice.fr.prog

Merci pour cette réponse.

La boucle est parfaite. Mais comment insérer un lien hypertexte dans une cellule ? Avec sethyperlink, sans doute. Est-ce que quelqu'un peut m'en dire plus.

Merci à l'avance.

jip

-----Message d'origine----- De : christianwtd [mailto:chri@free.fr] Envoyé : dimanche 18 décembre 2005 22:19 À : pr@fr.openoffice.org Objet : Re: [prog] For each ...

jean-paul mesters a écrit :

Bonjour,

Je cherche à reproduire la boucle VBA suivante :

For Each Cell In Range("A1:A300") ActiveSheet.Hyperlinks.Add Anchor:=Cell, Address:="D:\Images\" & Cell.Value & ".jpg", TextToDisplay:=Cell.Value Next

Est-ce que quelqu'un a une idée, une piste.

A l'avance merci

jip

Bonsoir,

Je te propose :

Sub Test Dim oDocument As Object, oSheet As Object, oCell As Object oDocument=ThisComponent oSheet=oDocument.Sheets.getByName("Feuille1")

For i = 1 to 300 Txt = "D:\Images\" & i & ".jpg" oCell=oSheet.getCellByPosition(0,i) oCell.setValue(i) oCell.setString(Txt) Next i End Sub

Bon surf, Christian