Copying to clip board.

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Group

I want to be able to set a double-click event of a text box to copy it's
contents to the clip board.

Thanks Mike
(e-mail address removed)
 
Hi Mike,
to copy to clipboard either
1. From Access Web
http://www.mvps.org/access/api/api0049.htm

-or-

2. Use the following code example - must first set focus
on control and then select text before a copy command.

Private Sub Command45_Click()
With [ControlName]
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
RunCommand acCmdCopy
End Sub

Luck
Jonathan
 
Johathan

Thanks that worked great! Thanks also for the link to the more complexed
code I might use that at a later date.

We wanted to use this to copy an e-mail address to the clipboard and
then paste it into your mail client.

Thanks again
Mike

Jonathan Parminter said:
Hi Mike,
to copy to clipboard either
1. From Access Web
http://www.mvps.org/access/api/api0049.htm

-or-

2. Use the following code example - must first set focus
on control and then select text before a copy command.

Private Sub Command45_Click()
With [ControlName]
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
RunCommand acCmdCopy
End Sub

Luck
Jonathan
-----Original Message-----
Group

I want to be able to set a double-click event of a text box to copy it's
contents to the clip board.

Thanks Mike
(e-mail address removed)


.
 
Back
Top