par maroudev » Jeu Mai 31, 2007 12:22 pm
Voici le code que j'ai utiliser :
word est un objet Automation dynamique
word = allouer un objet Automation "Word.application"
word>>Documents>>Open("C:\test.doc") //Fichier Word
word>>Visible = Vrai
j est un entier
k est un entier = TableOccurrence(TABLE_Pieces)
POUR j = 1 A k
TANTQUE j <= k
TableSelectPlus(TABLE_Pieces,j)
word>>Selection>>GoTo(-1,0,0,"Numeropiece") // numeropiece et le nom du signet sous word
word>>selection = TABLE_Pieces.IDPieces_Visitee[j]
word>>Selection>>GoTo(-1,0,0,"nompiece")
word>>selection = TABLE_Pieces.Nom_Piece[j]
word>>Selection>>GoTo(-1,0,0,"etage")
word>>selection = TABLE_Pieces.Etage[j]
SI TABLE_Pieces.Visitee = True ALORS
word>>Selection>>GoTo(-1,0,0,"visiteeoui")
word>>selection = "X"
SINON
word>>Selection>>GoTo(-1,0,0,"visiteenon")
word>>selection = "X"
FIN
word>>Selection>>GoTo(-1,0,0,"justificationtab")
word>>selection = TABLE_Pieces.Justification[j]
j++
FIN
FIN