1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Dim PSdoc_Etiquette = PSref.Documents.Item(1)
Dim PSdoc_PlancheContact = PSref.Documents.Item(2)
PSref.ActiveDocument = PSdoc_Etiquette
PSdoc_Etiquette.Selection.SelectAll()
PSdoc_Etiquette.Selection.Copy(True)
PSref.ActiveDocument = PSdoc_PlancheContact
'Photoshop commence à 1 et non 0
For i = 1 To PSdoc_PlancheContact.ArtLayers.Count
PSdoc_PlancheContact.ArtLayers.Item(i).Visible = False
Next
For i = 1 To PSdoc_PlancheContact.ArtLayers.Count
PSdoc_PlancheContact.ArtLayers.Item(i).Visible = True
PSdoc_PlancheContact.ActiveLayer = PSdoc_PlancheContact.ArtLayers.Item(i) 'Sélection "Calque i"
Dim myZoneCalque = PSdoc_PlancheContact.Channels(1)
PSdoc_PlancheContact.Selection.Load(myZoneCalque, 1, True) 'psReplaceSelection est égale à (1), (True) est égale à la zone remplie du calque
PSdoc_PlancheContact.Paste(True) 'Colle (True = dans le calque actif)
PSdoc_PlancheContact.ArtLayers.Item(i).Merge() 'Fusionne
PSdoc_PlancheContact.ArtLayers.Item(i).Visible = False
Next
For i = 1 To PSdoc_PlancheContact.ArtLayers.Count
PSdoc_PlancheContact.ArtLayers.Item(i).Visible = True
Next |
Partager