Thank you for the useful and clear web page.
Where is the mistake now ? (I have now an empty userform in the project,
but
no possible reference here to MS Forms 2.0 object library)
Type DataObject
toto As Object
End Type
________________________
Sub MyTest()
Dim MyData As DataObject
Dim strClip As String
Set MyData = New DataObject (compiler error here : incorrect use of
the “new†keyword )
MyData.GetFromClipboard
strClip = MyData.GetText
MsgBox (strClip)
End Sub
___________________________
Thank you for help again
Troubadour
Jonathan West said:
troubadour said:
Thank you. Could you help me just a little bit more :
The name of the file i wish to open is in the clipboard.
My syntax seems to wrong :
Dim MyFile as string
MyFile = getFromClipboard() [i think i need a prefix here, but what
kind
?]
or MyFile.getFromClipboard() ???
Documents.Open MyFile
Thank you for help
This article tells you how to do this
Manipulating the clipboard using VBA
http://www.word.mvps.org/FAQs/MacrosVBA/ManipulateClipboard.htm
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org