Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

Can u convert this VBA code to vb.net please?

Thanks

 

Dim clipboard As DataObject

clipboard = New DataObject

clipboard.SetText doc.responsetext

clipboard.PutInClipBoard

 

'And here I would like to see what is on the clipboard...

Farshad
  • Administrators
Posted (edited)

Following may give you a pointer or two

 

'To retrieve text from clipboard
Dim dobj As DataObject
dobj = Clipboard.GetDataObject()
Dim formats() As String = dobj.GetFormats(True)	   'will get a list of supported formats

'if Text is supported then
Dim s As String
s = dobj.GetData("Text")

'To put text on clipboard
dobj.SetData("Text", s)

Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...