Bruen, Bruce
Bruce.Bruen at railcorp.nsw.gov.au
Wed Aug 17 22:19:58 CDT 2005
Stuart, Stop looking. Tery Krefts code su7ggested by Bryan is just the ticket. Thanks to all. bruce P.s. Although I've never needed to do this before, its amazing that its not a comon function! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 18 August 2005 1:10 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] copy string to clipboard On 17 Aug 2005 at 22:32, Bryan Carbonnell wrote: > On 18 Aug 2005 at 12:28, Bruen, Bruce wrote: > > > This must! be simple. > > > > I have a string variable created by concatenating the values of > > several form fields. So how can I copy the value of this string to > > the clipboard? > > > > Private Sub Command35_Click() > > Dim refstr As String > > refstr = "RCRef=|" & Me.ucref & "|" & Me.testname & "|" & > > Me.TestID > > & "|" > > Debug.Print refstr > > Stop > > ':-( Runcmd accmdStickTheStringInTheClipboard :-( End Sub > > It's an API call. > > Have a look at http://www.mvps.org/access/api/api0049.htm for the gory > details. > I'm trying to dig up some code I have to do this - can't find it at the moment. As Brian says, it's fairly gory. It needs memallocs and deallocs plus determining the correct datatype. As a quick and dirty workaround, you may be able to put the string in a control, set focus to the control and use Docmd.RunCommand acCmdCopy -- Stuart -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com This e-mail and any attachments may contain confidential information that is intended solely for the use of the intended recipient and may be subject to copyright. If you receive this e-mail in error, please notify the sender immediately and delete the e-mail and its attachments from your system. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient. Any opinion expressed in this e-mail and any attachments is not an opinion of RailCorp unless stated or apparent from its content. RailCorp is not responsible for any unauthorised alterations to this e-mail or any attachments. RailCorp will not incur any liability resulting directly or indirectly as a result of the recipient accessing any of the attached files that may contain a virus.