W
Warrick
Hi,
Has anybody successfully been able to read the clipboard
contents using a word macro and calling getfromclipboard
and gettext on a Mac running Office X and Mac X 10.3?
The following code from Microsoft (kbid=212730) is meant
to do the trick but fails with a runtime error everytime!
Can somebody help please!!!!
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 anybody successfully been able to read the clipboard
contents using a word macro and calling getfromclipboard
and gettext on a Mac running Office X and Mac X 10.3?
The following code from Microsoft (kbid=212730) is meant
to do the trick but fails with a runtime error everytime!
Can somebody help please!!!!
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