Hi Paul,
Are you calling the GetData method of the iClipboardData object? This code works consistently for me:
Dim iClipboardData As IDataObject = Clipboard.GetDataObject()
MessageBox.Show(iClipboardData.GetData(DataFormats.Text))
>I'm trying to access the clipboard via a macro. I'm using the vanilla code shown in the docs to do this:
>
>
>Dim iClipboardData As IDataObject = Clipboard.GetDataObject()
>
>
>However, iClipboardData keeps getting set to Nothing. Clipboard.GetDataObject() isn't returning an object reference. I'm positive that there is something on the clipboard. Is this something funky with testing from a macro? Or am I misunderstanding how this should work (eg. is the "System" clipboard something completely different than the clipboard used by every other Windows app?)
>
>Thanks,
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi