none
DataObject .setText and .putInClipboard sequence puts invalid data (Hex 63 characters) in clipboard

    Question

  • My Word VBA application includes a form which uses a DataObject to put some text to the clipboard. The user can then paste it into the Word document.
    This has worked fine for many years. Yesterday I found that it has began to fail intermittently. The failure is that when the user pastes into Word, two characters are pasted instead of what is expected.

    I stripped out the code into a new userform which includes a TextBox ('TextBox1') and a button ('cbCopy') whose code is like this:
    Dim clipboard As DataObject
    Private Sub UserForm_Initialize()
        Set clipboard = New DataObject
    End Sub
    
    Private Sub cbCopy_Click()
        clipboard.setText text:=Me.TextBox1.Value
        clipboard.PutInClipboard
        Me.hide
    End Sub
    Sometimes it works fine, but mostly not. When not, exactly two characters are pasted regardless of the contents of TextBox1. The characters are identical, and if I Select one and run the command
    ?Asc(Selection)
    in the Immediate Window, they are always the same : 63.

    The problem began to happen on my main machine: 32-bit Office Professional Plus 2010 (Version 14.0.6123.50013) under 64-bit Windows 8 Pro, set to apply all maintenance automatically. I suspect that some recent maintenance could be the problem. If I run the identical code in any of my test environments (Virtual Machines running various combinations of Windows XP, Windows 7, Office 2000 through 2007, no automatic maintenance) the problem does not occur. Nor has it occurred in my main machine (specs above) until recently.
    Tuesday, November 27, 2012 7:23 AM

Answers

  • I opened a support case with Microsoft as suggested by Kirk Beller. The process was quite satisfactory, and after a very useful exchange, MS determined the cause to be 'most likely a flaw in our product'. So far, I have had no notification of when or if it might be fixed - MS have to recognise a strong enough business case.

    During the course of the case, MS helped me develop a robust workaround using native Windows API calls instead of a DataObject. These are documented in the following articles:
       >  http://msdn.microsoft.com/en-us/library/office/ff192913.aspx (How to: Send Information to the Clipboard);  
       >  http://msdn.microsoft.com/en-us/library/office/ff194373.aspx (How to: Retrieve Information from the Clipboard).

    Friday, March 29, 2013 5:45 PM

All replies

  • Hi Julian,

    Thanks for posting in the MSDN Forum.

    It works fine on my side. It's based on my experience that the problem will not exist in the code which you provided. And I notice that your use ?Asc(Selection) in your command line. I think you perhaps have error in your document. Selection isn't a member of form.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 28, 2012 2:01 AM
    Moderator
  • Tom,

    The problem is intermittent here, though frequent. I have just spent some time trying to recreate it again; it happened twice out of five runs. Such problems are always the hardest to track down.

    I am aware that Selection is not a member of the Userform class. What I am trying to explain is that if I Select one of the faulty characters in my document and enter ?Asc(Selection) in the Immediate window, the character proves to be Hex 63.

    I have put a document I created to investigate and reproduce the problem on SkyDrive: Bug55 Reproduce.doc (http://sdrv.ms/Ssu2rP). It includes a brief explanation and some test results. 

    As to whether this document itself is the problem, perhaps having some obscure corruption: I think not, as the problem first occurred in another userform in another document.

    I would be grateful if you could find out if there has been any recent maintenance to the DataObject class, or any related classes.

    Wednesday, November 28, 2012 7:59 AM
  • Select your Q and try this,

    Sub test()
    Dim by() As Byte
    
    by = (Selection)
    Debug.Print by(0), by(1)    '    255, 255, ie 65535
    
    Debug.Print AscW(Selection) ' -1
    ' ie 65536-1 because    AscW is an Integer
    
    Selection.Font.Name = "WingDings"
     ' ChrW(65535) is the Win-logo in WingDings
    
    End Sub

    Peter Thornton

    Wednesday, November 28, 2012 2:48 PM
    Moderator
  • Peter,

    Thanks for taking an interest.

    I selected one of the pairs of dodgy characters and ran your code. Here is a screenprint from the VBA IDE:

    Back in the document, this is how the selected characters appear - indeed, two Windows logos:

    What is the significance of this?

    Wednesday, November 28, 2012 6:17 PM
  • Not sure I can add anything to the "significance of this" beyond what the code snippet reveals. You have replicated the same results as I noted in the comments.

    For some reason a pair of "wide" characters chrW(65535) were pasted (typically will only display in certain symbol type fonts), presumably because that's what were copied. Though not for me in limited testing.

    For debugging maybe adapt your dataobject code with something like this

    [vbnet]
    Private Sub cbCopy_Click()
    Dim i As Long
    Dim s As String
    Dim by() As Byte
        clipboard.setText text:=Me.TextBox1.Value
       clipboard.PutInClipboard
        s = clipboard.GetText
       If Len(s) Then
           by = s
           For i = 0 To UBound(by) Step 2
               If by(i) = 255 And by(i + 1) = 255 Then
               ' or
               ' If by(i) = 255 And by(i + 1) >0  Then  ' some "wide" charater
                   Debug.Print s, (1 * 2) / 2, by(i); by(i + 1)
                   MsgBox "odd text in the clipboard" & vbCr & s
    Stop '
                   Exit For
               End If
           Next
       End If
       Me.hide
    End Sub

    With the text is assigned to the Byte array if that Win-logo is included it should get flagged. Obviously don't distribute code with that Stop.

    Note the VBE cannot display wide characters, only a ?

    Peter Thornton

    Wednesday, November 28, 2012 7:54 PM
    Moderator
  • Actually looking again I slightly mislead you. The Windings Win-logo is normally simply Chr(255). However your pasted text, the ? symbol, is clearly (255,255) or code-65535, and maps as Unicode to the win-logo character symbol in Windings

    I don't know how that got into clipboard and pasted to your document, would need to know what got copied in the first place.

    Peter Thornton

    Wednesday, November 28, 2012 10:50 PM
    Moderator
  • What was originally put in the clipboard does not affect the end result. When I first saw the problem, it was a string like '23 days (0 years, 0 months, 23 days'. When recreating the problem in the document on SkyDrive, it was 'asdf'.

    A little more info: the problem occurs in the copy-to-clipboard sequence - pasting the faulty clipboard into any text application (not just Word) gives the same character pair.

    Thursday, November 29, 2012 7:34 AM
  • No doubt but suggest you debug along the lines I suggested earlier. IOW, examine what's gone into the clipboard (databoject) immediately after. If for some reason that doesn't catch the odd text, immediately after seeing an incorrectly pasted result check what's in the clipboard by examining the text as a byte array, also with the same approach as suggested.

    Peter Thornton

    Thursday, November 29, 2012 8:43 AM
    Moderator
  • Peter,

    I took out the conditional ' If by(i) = 255 And by(i + 1) = 255 Then . . ' to make the Debug.Print execute no matter what. On the first attempt I got the problem: here is the output:

    By the by, I am not quite sure why you have the expression '(1*2) / 2' in the Print statement . . . did you mean '(i*2)/2'? I changed the code to run with that, and (again on my first attempt - this is almost re-creatable to order!) the output is:

    asdf           0             97  0 

    Friday, November 30, 2012 6:46 AM
  • I am also having this issue.  To make this simple I created simple code.

    I'm running Office 2010 and Windows 8 64 bit.

       Dim myData As New DataObject

            

         Dim ss As String   

        MyData.SetText "Simple Text String"
        Debug.Print "GetText before put in clipboard"
        Debug.Print MyData.GetText, MyData.GetFormat(1)
        MyData.PutInClipboard
        Debug.Print "Getting Text after PutInClipboard"
        Debug.Print MyData.GetText, MyData.GetFormat(1)
        ss = MyData.GetText
         Dim i As Integer
        Debug.Print "For Completeness of the discussion show all Characters"
        For i = 1 To Len(ss)
            Debug.Print "Character " & i & " is " & Mid(ss, i, 1) & " Ascii Value="; Asc(Mid(ss, i, 1))
        Next i

    These are the results.  

    GetText before put in clipboard
    Simple Text String          True
    Getting Text after PutInClipboard
    ??            True
    For Completeness of the discussion show all Characters
    Character 1 is ? Ascii Value= 63 
    Character 2 is ? Ascii Value= 63 

    When the text is placed in the clipboard it is no longer visible.



    • Edited by Obprg Wednesday, December 05, 2012 4:33 AM Correction
    Friday, November 30, 2012 4:59 PM
  • Thanks to Peter and Obprg for your contributions. I have added some code based on your suggestions to my test file: the updated version is 'Bug 55 Reproduce #2' at http://sdrv.ms/VaF3MT. It contains instructions about how to try to recreate the problem using the code done so far.

    One thing I have noticed is that the Debug output I obtain never shows any sign that a subsequent Paste will exhibit the problem: this is different from Obprg's experience.

    Another thing, which is potentially more useful: I have found another Windows 8 / Office 2010 machine on which I have so far been unable to recreate the problem despite many attempts. It has a very similar software environment to the two machines where the problem does occur. I ran Belarc Advisor reports on all three machines, and found that the failing ones had some fixes that the (so far) non-failing machine does not. This is the relevant part of the Belarc Listing:

                      Visual C++ 2010 x64 Redistributable - 10.0.40219
                          KB2565063 on 03/10/2012 (details...)
                      Visual C++ 2010 x86 Redistributable - 10.0.40219
                          KB2565063 on 03/10/2012 (details...)
                      Visual Studio 2010 Prerequisites - English
                          KB2413561[SP] on 03/10/2012 (details...)
                      Visual Studio 2010 Shell (Isolated) - ENU
                          KB983509[SP] on 03/10/2012 (details...)
                          KB2635973 on 04/10/2012 (details...)
                          KB2645410 on 04/10/2012 (details...)

    Before I try to uninstall them on one of the problem machines, I would be grateful if Peter and Obprg could let me know if the fixes are on the machines they have been using. The Belarc Advisor I used can be downloaded at http://www.belarc.com/free_download.html.

    I would also hope that, particularly now that someone else has verified that the problem exists, someone with an official Microsoft position will take this up as part of the Priority Support I am supposed to receive as part of my rather expensive MSDN subscription.
    • Edited by Julian Ladbury Saturday, December 01, 2012 12:23 PM Remove red herring
    Saturday, December 01, 2012 10:44 AM
  • I've been away a few days. Not sure why I said 1*2) / 2, think it was meant to indicatre the character number in the string but if so that's wrong, the * should be +. Try the following to demo how the assigning a string to a byte array can be useful in debugging Unicode, particularly beyond 32k where AscW is limited

    Sub test()
    Dim i As Long
    Dim s1 As String, s2 As String
    Dim arr
    Dim dObj As DataObject
            For i = 100 To 60000 Step 1025
                 s1 = s1 & ChrW(i)
         Next
         s1 = "ABC " & s1
            Set dObj = New DataObject
         dObj.SetText s1
         dObj.PutInClipboard
            Dim by() As Byte
         s2 = dObj.GetText
         by = s2
         For i = 0 To UBound(by) - 1 Step 2
    Debug.Print (i + 2) / 2, by(i); by(i + 1), by(i) + by(i + 1) * 256&
         Next
    
    End Sub

    In a new project you'll need a reference to MSForms, simply add a userform (which you can then immediately remove).

    After running the above do Ctrl-V to some app, maybe change the font to Windings are a non-Latin font to better illustrate.

    Peter Thornton

    Sunday, December 02, 2012 11:50 AM
    Moderator
  • Interesting observations. I'll look into your link but not today!

    Rather than uninstall anything can you roll back to a restore point before any of those updates were installed on your system (look at win-update)

    Peter Thornton

    Sunday, December 02, 2012 12:02 PM
    Moderator
  • I have installed Visual Studio 2012 on this machine.

    Wednesday, December 05, 2012 4:31 AM
  • Would the MSDN person or persons who should be providing priority support for this thread please provide an update on its status from their point of view.
    Wednesday, December 05, 2012 7:26 AM
  • Hi Julian,

    I tested on a computer running 64-bit Windows 8 and 32-bit Office 2010.  The file version of Word (winword.exe) is 14.0.6123.5000.

    I tried going through the code in the initial posting, Bug 55 Reproduce document, the code provided by Obprg on Nov-30, but unfortunately have not been able to reproduce the problem. 

    One thought as to what could be going on is an add-in loaded by Word.  The active application add-ins I had loaded were:
    • Date (XML)
    • Financial Symbol (XML)
    • Instant Messaging Contacts (English)
    • Measurement Converter (Measurement Converter)
    • Telephone Number (XML)

    Another thought as to what may be going on is some other application that might also access the clipboard.  I tried with Internet Explorer running but that did not seem to make a difference.

    There is an updated version of Word found in Microsoft Security Bulletin MS12-079 - Critical.  This should get Word (winword.exe) up to 14.0.6129.5000.

    At this point unless someone else has additional suggestions, I would recommend opening up a support case with Microsoft so we can look into the issue with you.  You can create a case online by using the following link:  http://support.microsoft.com/oas

    Thanks,

    Kirk Beller

    Microsoft Online Community Support


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, December 21, 2012 11:16 PM
  • Kirk,

    Thank you for your reply. I am still investigating here as time becomes available. In case anyone else stumbles across this post, I would like to record that I can recreate this problem in a Virtual Box virtual machine running Windows 8 (64-bit) and Office 2010 (32-bit - 14.0.4760.1000), with no add-ins and no other software installed or running apart from Virtual Box Guest Additions:

    Thus, for the avoidance of doubt, my earlier suspicion (December 01 2012) that various Visual products might be involved can be discounted.

    Wednesday, January 02, 2013 12:52 PM
  • I am having the same problem, same setup: Win8 (64 bit) and word 2010.

    Did anyone find a solution yet?

    Regards,

    Jochem


    • Edited by Jochem TS Sunday, March 24, 2013 11:46 AM
    Sunday, March 24, 2013 11:43 AM
  • I opened a support case with Microsoft as suggested by Kirk Beller. The process was quite satisfactory, and after a very useful exchange, MS determined the cause to be 'most likely a flaw in our product'. So far, I have had no notification of when or if it might be fixed - MS have to recognise a strong enough business case.

    During the course of the case, MS helped me develop a robust workaround using native Windows API calls instead of a DataObject. These are documented in the following articles:
       >  http://msdn.microsoft.com/en-us/library/office/ff192913.aspx (How to: Send Information to the Clipboard);  
       >  http://msdn.microsoft.com/en-us/library/office/ff194373.aspx (How to: Retrieve Information from the Clipboard).

    Friday, March 29, 2013 5:45 PM
  • I'm having this same problem, but in Excel 2010 (32-bit) on Windows 8x64.  Visual Studio is installed.

    Here's some code to reproduce the bug. You have to split it into two subs for the bug to occur.  Within the same run session, the DataObject retains its text properly.

    Sub test1()
        Dim x As DataObject, storestr As String
        storestr = "Copy this string"
        Set x = New DataObject
        Debug.Print storestr
        x.SetText storestr
        x.PutInClipboard
        Set x = Nothing
        'Call test2 here and it will correctly return storestr!
        Call test2
    End Sub

    Sub test2()
        Dim x As DataObject, i As Integer, temp As String
        Set x = New DataObject
        x.GetFromClipboard
        temp = x.GetText
        Set x = Nothing
        'You're going to get two char(63)s returned here,
        'but only if you put them in the clipboard via .SetText,
        'and only if the run session that .SetText has completed!
        For i = 1 To Len(temp)
            Debug.Print "Character " & i & " is " & Mid(temp, i, 1) & " Ascii Value="; Asc(Mid(temp, i, 1))
        Next i
    End Sub

    Sub test3()
        'This will work correctly
        test1
        test2
    End Sub

    Friday, May 17, 2013 9:27 PM
  • I can't replicate though fully accept you and others experience what you say. I tried test2 a long time after test1 (not touching the clipboard between times) and it worked fine. I couldn't return any char(63)s at all.

    Peter Thornton

    Saturday, May 18, 2013 3:49 PM
    Moderator
  • I am now on a different machine, running Windows 8 again but this time running Office 2013 64-bit.  I am still struggling with VBA clipboard access issues using MSForms.DataObject.  I am wondering if text copied to the clipboard using the DataObject is only properly accessible using the DataObject's .GetText method.

    On top of this, the suggested workaround of API calls does not work in my configuration, I think because 64-bit office requires PtrSafe API declarations.

    I am not aware of any way to put text on the clipboard in Office VBA under Windows 8 and Office 64-bit.  I will vote up any helpful responses!
    Wednesday, August 21, 2013 7:57 PM
  • I'm having the very same problem with a very simply build laptop. Win 8 x64 and office 2010. I made my code as simple as possible and still get the error (two '?' instead of the text):

    Dim objData As New DataObject,  strCopy2 As String       

    strCopy2 = "Test"   

    With objData       

    .SetText strCopy2       

    .PutInClipboard   

    End With


     
    Thursday, August 22, 2013 1:53 PM
  • I'm also having this exact same problem.
    Win8 x64 and both in combination with Excel 2013 (32-bit) and Excel 2003 this happens.
    Monday, September 23, 2013 2:33 PM
  • Hi all,

    Same issue makes me headache for nearly a day. But right now it seems being resolved!

    Environment: Win8.1 + Office 2007 SP3 (Chinese language)

    Trying to automate a webpage via VBA code in an Excel .xlsm file. Using VBA to generate some text content based on Excel tables. Then put into clipboard for an easy text input demand.

    All going well till this morning. The DataObject refused to work properly. SetText() + PutInClipboard() in a piece of simple code always put 2 unknown characters into clipboard. These 2 characters can not be shown in Notepad, but were shown in WinWord after press Ctrl V to paste to, which looks like "??".  

    Don't know why. But while looking through this topic, baodad1's post reminds me something. In my VBA project, I am using OnDocumentComplete Event to monitor a WebControl's document URL. It is possible for the Sub that contains the piece of DataObject code being called before a previous call of the same Sub ends up.

    I changed the code slightly to prevent the Sub being called in stuck and tried the VBA project again. The result was - - - the same - DataObject still refused to work porperly!

    Then, I restarted my computer and tried again. This time, DataObject got alive! 

    Several hours pasted. The issue seems being resolved in my computer!

    Based on my limited computer knowledge, I guess the reason that DataObject refused to work is :

    1 A stuck calling of a piece of code like below, broke the heart of the DataObject :(

    dim doClip as DataObject
    set doClip = new DataObject
    doClip.SetText("text")
    doClip.PutInClipboard

    2 Too long not restart your computer - typically for Win8 users?

    3 Unknown system change through recent Windows/Office auto updates? (around 2014/5/14 - 2014/5/16)

    Anyway, thanks to Julian and all above for investigating the issue. Hope the experience in my computer can also help someone else.

    Regards,

    Junco

    Friday, May 16, 2014 5:06 PM
  • This problem is not related to any complicated code. I have basically the same code as Junco:

    Sub PutInClipboard(s As String)
        Dim DataObj As New MSForms.DataObject
        DataObj.SetText s
        DataObj.PutInClipboard
    End Sub
    
    It worked well for several months, and after I updated to Windows 8.1 Enterprise, I just get two characters (question marks in boxes, if font Calibri is used). Maybe it has to do with me having installed Chinese Simplified (through the language options). Office version is 15.0.4641.1003. After reboot, it worked a couple of times, but suddenly stopped working again.

    Thursday, August 28, 2014 10:53 PM
  • No reply yet, so I came up with a workaround:

    Sub PutInClipboard(s As String)
        Dim DataObj As New MSForms.DataObject
        Dim sCheck As String
        
        With DataObj
            .SetText s
            .PutInClipboard
        End With
        
        ' necessary because of bug:
        If GetFromClipboard <> s Then
            InputBox "Sorry, there's a glitch in the clipboard. Copy the text yourself from here: ", "Clipboard Workaround", s
        End If
    End Sub
    
    Function GetFromClipboard() As String
        Dim DataObj As New MSForms.DataObject
        
        With DataObj
            .GetFromClipboard
            GetFromClipboard = .GetText
        End With
    End Function

    Tuesday, September 02, 2014 8:14 PM
  • Unfortunately, that doesn't work reliably, either. Sometimes the InputBox doesn't get called, even though the content is garbage. Apparently it gets garbled at some time of the system's choosing.

    I agree with Junco; it's a headache!

    Tuesday, September 02, 2014 11:43 PM
  • Thanks Julian.

    I began experiencing this problem when I began using my new Lenovo machine (64 bit) with Win 8.1 and Office 2013.

    The API workaround works fine.

    • Proposed as answer by Chris MacroMVP Wednesday, January 07, 2015 3:15 PM
    • Unproposed as answer by Chris MacroMVP Wednesday, January 07, 2015 3:15 PM
    Thursday, December 04, 2014 2:06 PM
  • I've been scratching my head around this for a couple months now and am glad to find others who have experienced this same problem.  I am running into PutInClipboard giving me two question mark symbols (ie ??) when I paste, while running Excel 2013 (32-bit) on Windows 8.1.  My same VBA code works fine running on Excel 2007, Windows 7.  It's unfortunate this bug has been recognized for quite some time and never addressed.

    I was looking into the API workaround but as I am not too familiar with that type of coding, I wasn't able to get it to work (it looks like Microsoft's example code was for Access rather than Excel).  Would anyone be willing to post an API solution that will work in Excel?   I just need to place a string variable's text into the Clipboard.

    http://msdn.microsoft.com/en-us/library/office/ff192913.aspx

    For my current workaround, I am just printing to the Immediate Window (debub.print) and manually (I hate that word!) copying my text.



    Wednesday, January 07, 2015 4:03 PM
  • The API demo you found should work fine for your needs. Copy the API declarations to the top of a module and the function ClipBoard_SetData below.

    Sub test()
    Dim strCopy As String
        strCopy = "hello world"
        ClipBoard_SetData strCopy
    
    End Sub

    Run test() then do Ctrl-V in any app that accepts text

    Note as written the APIs will need adapting if to be used in Office 64

    Thursday, January 08, 2015 12:20 AM
    Moderator
  • Now I've got it to work!  I was getting thrown off by the example line "DoCmd.RunCommand acCmdCopy".  Thanks for explaining the setup to me Peter.
    Sunday, January 11, 2015 6:05 AM
  • Old thread but still a problem. Anyway I just solved the problem on my end by adding a short wait period prior to puting into clipboard...

                                           


    Application.Wait Now + TimeValue("00:00:01")
    dataObject.PutInClipboard

    ..maybe this works for others as well.

    Cheers,

    Sandra

    Wednesday, April 15, 2015 10:43 AM
  • Well, here we are 3 years after the original problem and MS have given fixing it their usual nil-priority. Sign me up for this same problem. I'm using Access 2010 on Win 7 / 64.

            DataObj.SetText OrderDetailsString
            DataObj.PutInClipboard

    I have been using this code since 2010 without problem. The error started about a month ago. I have changed nothing so it must be an auto-update that has changed something. Now I have the pleasure of explaining to my customers why their software keeps crashing.

    Sunday, November 08, 2015 10:51 AM
  • Can you give an example of the string that makes it crash for you and your users.
    Monday, November 09, 2015 10:04 AM
    Moderator
  • Hi!
    sorry for my bad English ...

    To work around this problem, I placed on the form a Textbox calling txt_Clipboard,
    I made it invisible with the visible property (txt_Clipboard.Visible = False) I so added the text in the textbox (eg.: txt_Clipboard.text = MyString) I selected all the text (txt_Clipboard.SelStart = 0, txt_Clipboard.SelLength = txt_Clipboard.TextLength) Finally I copied the text in the textbox into the Windows clipboard with the copy method (txt_Clipboard.Copy)
    Listing here:        
            
    Private Sub cmd_Test_Click()


            Me.txt_Clipboard.Text = "Test: navigation from Italy to Australia"
           
            
            
            Me.txt_Clipboard.SelStart = 0
            Me.txt_Clipboard.SelLength = txt_Clipboard.TextLength
            
            Me.txt_Clipboard.Copy


    End Sub
    Saturday, January 30, 2016 12:39 PM
  • I have the same problem with Window 10 x64 and MSO 2016 x32.

    This code that worked for years no longer works and the double question mark "??" is returned when using Ctrl+V even if the .GetText method works:

    ' Dependencies : Microsoft Forms 2.0 Object Library
    ' No longer working with Ctrl+V when tested on Windows 10 x64 and MSO 2016 x32
    Sub ClipboardTest()
      ' https://msdn.microsoft.com/en-us/library/aa244176(v=vs.60).aspx
      Dim myClipboard As New DataObject
      With myClipboard
        .SetText "Hello World"
        .PutInClipboard
        Debug.Print .GetText
      End With
    End Sub


    Presentation specialist and VBA macro/add-in developer for PowerPoint http://youpresent.co.uk/


    Friday, July 01, 2016 10:32 AM
  • I had the same problem when I updated to Windows 10 64-bit. Diane Poremsky of Slipstick Systems posted a fix in the comments section on this page: xxxx

    It fixed my problem with the double question marks being returned!

    Oh well, MSDN won't let me post the link. If you go to the Slipstick Systems site and search for "Paste clipboard contents using VBA" you'll see the fix in the comments section.
    Friday, July 22, 2016 4:43 PM
  • I do not know why this?, BUT IT WORKS

    Sub PutInClipboard(s As String)

    Dim DataObj As New MSForms.DataObject

    With DataObj

    .PutInClipboard

    .Clear

    .SetText s

    .PutInClipboard

     End With

    ‘…

    DataObj.SetText s

    End Sub
    Sunday, October 16, 2016 2:56 AM