Added loop to keep trying Clipboard.SetDataObject() until it works.