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 29 30 31 32 33 34 35 36 37 38 39 40 41
| 'ouvre paint et retaille l'image pour correspondre au rapport d'impression
Set ole = ActiveSheet.OLEObjects.Add(ClassType:="Paint.Picture", Link:=False, _
DisplayAsIcon:=False)
With ole
.Interior.Color = vbWhite
.Border.LineStyle = 0
.Border.Color = vbWhite
.Activate
End With
Application.Wait Time + TimeSerial(0, 0, 1)
SendKeys "^w", True
DoEvents
SendKeys "{RIGHT}", True
DoEvents
SendKeys "{TAB}", True
DoEvents
SendKeys "{TAB}", True
DoEvents
SendKeys "{TAB}", True
DoEvents
SendKeys " ", True
DoEvents
SendKeys "+{TAB}", True
DoEvents
SendKeys "+{TAB}", True
DoEvents
'rentre la valeur horizontale
SendKeys "280", True
DoEvents
SendKeys "{TAB}", True
DoEvents
'rentre la valeur vertical
SendKeys "65", True
DoEvents
'entrer
SendKeys "~", True
DoEvents
SendKeys "^{PGUP}^{PGUP}", True
DoEvents |
Partager