Copying from query to clipboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to copy email addresses from a single field query to the
clipboard for use in Groupwise. My problem is that I pickup the name of the
field along with the addresses. The code is:
DoCmd.OpenQuery ReportQuery, acViewNormal, acReadOnly
RunCommand acCmdSelectAllRecords
RunCommand acCmdCopy

This works fine except that the field name comes along with the addresses. I
tried acCmdSelectRecord which does the same thing with a single record.

Thanks for any suggestions.
Phil Raidt
 
Hi Phil.

I don't know if you can remove column headings from queries. If you can't.
.. .

I just completed a copy to clipboard project using some code from Terry
Kreft. I found in on Dev Ashish's access web. It's very easy to use. Just
copy it into a module and then call the Clipboard_SetText or
Clipboard_GetText

You need to write a little snippet of code to loop through each record.

http://www.mvps.org/access/api/api0049.htm

Hope this helps
David
 
David,
Thanks for your suggestion. I tried it and it worked fine.

I actually knew about Terry Kreft's code, but hesitated to use bunch of code
I didn't really understand when a couple simple lines should have done the
job. I'm still curious about the problem but will go with what works.
Phil
 

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

Back
Top