Sub voir_contenu_clipboard()
Dim ClipB As DataObject
Dim sText As String
Set ClipB = New DataObject
ClipB.GetFromClipboard
sText = ClipB.GetText
MsgBox sText
Set ClipB = Nothing
End Sub
Sub copier_vers_Clipboard()
Dim strText$, N_Clip As New DataObject
strText = ActiveCell.Text
With N_Clip
.SetText strText
.PutInClipboard
End With
Set N_Clip = Nothing
End Sub
Sub copier_vers_blocnotes()
Shell ("C:\Windows\system32\notepad.exe"), vbNormalFocus
SendKeys "%ES^V"
End Sub
Sheets("insert").Activate
Range(Sheets("insert").Cells(1, 1), Sheets("insert").Cells(10, 1)).Select
Dim strClip As String
Dim MyData As DataObject
strClip = ""
strClip = Sheets("insert").Cells(1, 1).Value
For t = 1 To 10000
If Sheets("insert").Cells(t, 1) = "" Then Exit For
strClip = strClip & vbCrLf & Sheets("insert").Cells(t, 1).Value
Next t
Set MyData = New DataObject
MyData.SetText strClip
MyData.PutInClipboard
Dim RetVal
RetVal = Shell("notepad.exe", 3)
SendKeys "%E"
SendKeys "{DOWN 3}"
SendKeys "~"
SendKeys "%F"
SendKeys "{DOWN 2}"
SendKeys "~"
SendKeys "Génération topo.scr"
Sheets("insert").Activate
Range(Sheets("insert").Cells(1, 1), Sheets("insert").Cells(10, 1)).Copy
Sub copier_vers_blocnotesII()
Sheets(1).Range(Cells(1, 1), Cells(10000, 1)).Copy
Shell ("C:\Windows\system32\notepad.exe"), vbNormalFocus
SendKeys "%ES^V"
End Sub
Sub copier_vers_blocnotesIV()
Sheets(1).Range(Cells(1, 1), Cells(10000, 1)).Copy
Shell ("C:\Windows\system32\notepad.exe"), vbNormalFocus
SendKeys "%ES^V%F^S~%E"
'Sendkeys "toto" ' renvoie juste o chez moi
End Sub
Sub copier_vers_blocnotesIII()
Sheets(1).Range(Cells(1, 1), Cells(10000, 1)).Copy
Shell ("C:\Windows\system32\notepad.exe"), vbNormalFocus
SendKeys "%ES^V"
SendKeys "%F^S"
SendKeys "~"
SendKeys "Génération topo.scr"
End Sub