
Using clipboard contents in macro?
Add a dummy userform to your VBE project. This, and a million other
bizzare gotchyas with Word's environments available from my books :-)
Quote:
>I copied the following from the MVP Using the Clipboard web page:
>Dim MyData As DataObject
>Dim strClip As String
>Set MyData = New DataObject
>MyData.GetFromClipboard
>strClip = MyData.GetText
>I want to use what I select and copy as the text to find in a macro. When I
>try to run this, though, the de{*filter*} says it doesn't know what DataObject
>is - "User-defined type not defined".
>Any suggestions?
>Ed
Steve Hudson
Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Products: http://www.*-*-*.com/
Spellbooks: 728 pages of dump left and dropping...
The VBA Beginner's Spellbook: For all VBA users.