Oui voici le code que je compile pour obtenir l'erreur si sa peut vous donner des pistes :
--------------------------------
on ouvrirFichier()
tell application "InDesign 2.0.2"
set myTextFramePref to text frame preferences
set vertical justification of myTextFramePref to top
set justification of myTextFramePref to center
set myDocument to make document
tell myDocument
set myDocumentPreferences to document preferences
tell myDocumentPreferences
end tell
tell myDocument
try
set couleurTitre to make color
tell couleurTitre
set color model to process
set color space to cmyk
set color value to {55, 0, 55, 20}
set name to "couleurTitre"
end tell
set couleurImage to make color
tell couleurImage
set color model to process
set color space to cmyk
set color value to {0, 0, 0, 0}
set name to "couleurImage"
end tell
set couleurTableau to make color
tell couleurTableau
set color model to process
set color space to cmyk
set color value to {15, 0, 15, 0}
set name to "couleurTableau"
end tell
end try
end tell
end tell
end tell
return myDocument
end ouvrirFichier
--------------------------------
on ecrireFichier()
tell application "InDesign 2.0.2"
tell myDocument
tell page (count of pages)
set myTextFrameTitre to make text frame
set geometric bounds of myTextFrameTitre to {Y0titre, X0titre, Y1titre, X1titre}
set fill color of myTextFrameTitre to swatch "couleurTitre" <--
par ici l'erreur
set stroke color of myTextFrameTitre to swatch "couleurTitre"
set myTextFrameImage to make text frame
set geometric bounds of myTextFrameImage to {Y0image, X0image, Y1image, X1image}
set fill color of myTextFrameImage to swatch "couleurImage"
set stroke color of myTextFrameImage to swatch "couleurImage"
set myTextFrameTableau to make text frame
set geometric bounds of myTextFrameTableau to {Y0tableau, X0tableau, Y1tableau, X1tableau}
set fill color of myTextFrameTableau to swatch "couleurTableau"
set stroke color of myTextFrameTableau to swatch "couleurTableau"
set text of myTextFrameTitre to "titre"
set text of myTextFrameImage to "photo"
set text of myTextFrameTableau to "tableau"
end tell
end tell
end tell
end ecrireFichier
--------------------------------------
ouvrirFichier()
ecrireFichier()