gallen
Well-known Member
- Joined
- Jun 27, 2011
- Messages
- 2,016
My company has just upgraded to 365.
My previous version was Office 2013
I had code that copied the text from a selected cell to the clipboard. This now doesn't work in 365
The code is as below:
This has worked fine until 365 was installed.
I tried late binding using similar code I found from Google:
This has the same result. When I paste anything I've copied it shows "??"
I've debugged line by line and the correct text is being added in the 'SetText' line but pasting gives me the 2 question marks.
Any clues?
My previous version was Office 2013
I had code that copied the text from a selected cell to the clipboard. This now doesn't work in 365
The code is as below:
Code:
Public Sub AddToClipboard(s As String)
Dim oCopy As DataObject
Set oCopy = New DataObject
oCopy.SetText s
oCopy.PutInClipboard
End Sub
This has worked fine until 365 was installed.
I tried late binding using similar code I found from Google:
Code:
Sub CopyText(Text As String)
Dim o As Object
Set o = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
o.SetText Text
o.PutInClipboard
Set o = Nothing
End Sub
This has the same result. When I paste anything I've copied it shows "??"
I've debugged line by line and the correct text is being added in the 'SetText' line but pasting gives me the 2 question marks.
Any clues?