View Full Version : Window 8 PutInClipboard error
ukyank
08-22-2013, 06:26 AM
Hi all,
Been looking for a resolution to an error I get with the PutInClipboard code below. Works in everything but win8 with office 2010. I get a "?" icon instead of the text. Any help would be greatly appreciated.
Dim objData As New DataObject, strCopy2 As String
strCopy2 = "Test"
With objData
.SetText strCopy2
.PutInClipboard
End With
ukyank
08-22-2013, 06:55 AM
MS is aware of the problem: http://social.msdn.microsoft.com/Forums/en-US/48e8c30c-24ee-458e-a873-a4e6e13f5926/dataobject-settext-and-putinclipboard-sequence-puts-invalid-data-hex-63-characters-in-clipboard, no concrete answer so far
What do you get using:
Sub M_snb()
With New DataObject
.SetText "Test_snb"
.PutInClipboard
MsgBox .GetText
MsgBox .GetFormat(1)
End With
End Sub
ukyank
08-22-2013, 08:35 AM
What do you get using:
Sub M_snb()
With New DataObject
.SetText "Test_snb"
.PutInClipboard
MsgBox .GetText
MsgBox .GetFormat(1)
End With
End Sub
Same error for pasting but msgbox isn't an issue. I don't use a dataobject for that
mancubus
08-22-2013, 11:14 AM
hi.
both codes worked for me with office 2010 on win8 machine.
Kenneth Hobs
08-22-2013, 11:50 AM
I don't have win8 to test. The link said that 2/5 times there was a problem with that control in win8. Problems like this break some controls. 64bit vs. 32bit is the issue.
I would put this links code into a Module and use them instead. You may still run into the 32 vs. 64 bit issue with API commands. Some of these may need an equivalent 64 bit code.
http://access.mvps.org/access/api/api0049.htm
mancubus
08-22-2013, 01:30 PM
my test:
win8 is 64-bit and office 2010 is 32-bit
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.