PCで実行されるマクロがあります。他の誰かがそれを実行すると、次の例外がスローされます。
"Run-time error '-2147221036 (800401d4)'
DataObject:PutInClipboard CloseClipboard Failed"
これが私のコードです:
Dim buf As String, FSO As Object
Dim CB As New DataObject
Set FSO = CreateObject("Scripting.FileSystemObject")
With FSO.OpenTextFile(sFile, 1)
buf = .ReadAll
buf = Replace(buf, ",", Chr(9))
.Close
End With
With CB
.SetText buf
.PutInClipboard // Here cause the exception.
End With