Make sure to use Clipboard.Clear before using Clipboard.SetText !
By the way, I would use something else than the Messenger API...
By "else" i mean a global windows hook that would notify me when a window is created.
Then I would get the class name, and if it is "IMWindowClass" get the caption title, and split to the last " - ".
But with that way, you won't be able to get the email/friendly name without using the messenger api...
But,
I think I have some code that changes to email view...
But, you need to have the contact list window open...
Good luck...
By the way, WDZ really needs to add the code coloring feature