copy to clipboard

J

Joel Allen

Hello,

I want to programatically copy text from one of my task fields and send it
to the
clipboard.

Can you someone point me in the right direction or give me some simple
sample code?

Thank you,
Joel
 
M

Michael Bauer

Am Tue, 21 Feb 2006 16:50:48 -0800 schrieb Joel Allen:

Joel, please add a reference onto the "Microsoft Forms 2.0 Library" to your
project. You can use that library´s DataObject object; call the Clear method
first and then use SetText to write your text into the clipboard.
 
J

Joel Allen

Thanks. I tried this and it's not working. Am I close? I'm tryin to get
the content of TestField into the clipboard.

Dim MyDataObj As New DataObject
MyDataObj = Item.UserProperties("TestField")
MyDataObj.SetText

Thanks for your help,
Joel
 
M

Michael Bauer

Am Wed, 22 Feb 2006 15:54:59 -0800 schrieb Joel Allen:

....
MyDataObj.Clear
MyDataObj.SetText "Whatever", 1
 
J

Joel Allen

Thank you.

I get an error though on this line:

Dim MyDataObj As New DataObject

It says "expected end of statement". I have added the "Microsoft Forms 2.0
Library" to my references too.

Thanks for your help,
Joel
 
M

Michael Bauer

Am Thu, 23 Feb 2006 11:27:30 -0800 schrieb Joel Allen:

Are you running VBScript instead of VBA?
 
M

Michael Bauer

Am Sun, 26 Feb 2006 19:44:36 GMT schrieb Joel Allen:

That depends on the point of view :) It helps me but as I´m not familiar
with VBScript I´m not sure whether or not I can help you.

Please try to change the declaration from

to
Dim MyDataObj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top