W
Warrick
Hi,
Has anyone had any success with the following code
(Microsoft kbid=212730)??
It fails everytime for me with a Run-Time error when the
gettext runs.
I hope someone can help! I've about given up!
Thanks
Warrick
Sub GetClipBoardText()
Dim MyData As DataObject
Set MyData = New DataObject
Dim sClipText As String
On Error GoTo NotText
' Get data from the clipboard.
MyData.GetFromClipboard
' Assign clipboard contents to string variable
sClipText.
sClipText = MyData.GetText(1)
MsgBox sClipText
NotText:
If Err <> 0 Then
MsgBox "Data on clipboard is not text."
End If
End Sub
Has anyone had any success with the following code
(Microsoft kbid=212730)??
It fails everytime for me with a Run-Time error when the
gettext runs.
I hope someone can help! I've about given up!
Thanks
Warrick
Sub GetClipBoardText()
Dim MyData As DataObject
Set MyData = New DataObject
Dim sClipText As String
On Error GoTo NotText
' Get data from the clipboard.
MyData.GetFromClipboard
' Assign clipboard contents to string variable
sClipText.
sClipText = MyData.GetText(1)
MsgBox sClipText
NotText:
If Err <> 0 Then
MsgBox "Data on clipboard is not text."
End If
End Sub