I have a macro that used to run fine, then when I went to use it today it just stopped working! Basically it takes a string off the clipboard, performs a number of string replaces on it and replaces it to the clipboard. I have included the reference to Microsoft Forms 2.0 object library.

Here is a cut down version of my Code:

Dim MyData As DataObject
Dim strClip As String

...
Sub myFunc()
Set MyData = New DataObject
MyData.GetFromClipboard
strClip = MyData.GetText
strClip = Replace(strClip, "/", "-")
strClip = Replace(strClip, "GENERAL", "GEN")
strClip = Replace(strClip, "LEADCHROME", "LC")
strClip = Replace(strClip, "AERO", "AE")
strClip = Replace(strClip, "LEADED", "LD")
strClip = Replace(strClip, "UNLEADED", "UL")
strClip = Replace(strClip, "SPECIAL", "SE")
strClip = Replace(strClip, "CLEARS", "CL")
strClip = Replace(strClip, "CLEAR", "CL")
strClip = Replace(strClip, "PASTEL", "PA")
strClip = Replace(strClip, "TINT", "T")
strClip = Replace(strClip, "ROSIN", "RO")
MyData.SetText strClip
MyData.PutInClipboard

End Sub

This used to work, but now it produces the following error:
"Run-time error '-2147221036 (800401d4)'
DataObject:PutInClipboard CloseClipboard Failed"

I have tested and the strClip is definitely being placed back into MyData.
Thanks in advance