DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: MS Data Object

  1. #1
    Join Date
    Jul 2004
    Location
    UK
    Posts
    4

    MS Data Object

    I am trying to set the Windows clipboard from Access VBA. I have found a suggestion that uses the .SetClipboard property of a Microsoft Data Object, but I cannot find the Data Object reference in Access. Apparently it is in MS Forms V2.0 Library, but I cannot find that either.

    Can anyone suggest where to find the library, or a different way to set the clipboard contents?

    Thank you in advance.

  2. #2
    Join Date
    Jul 2004
    Location
    UK
    Posts
    4

    VBA copy text to windows clipboard

    A colleague found how to do it - this post is for information for anyone else with the same problem.

    The Data Object definition is in FM20.DLL. To make it available in VBA, goto Tools, References, Browse and find FM20 in the file list (in my system it is in C:\WINNT\System32); click Open to add it to the references list.

    You can now include DataObject in a Dim or New, and use its .SetText and .PutInClipboard methods to copy information onto the Windows clipboard.

  3. #3
    Join Date
    Apr 2004
    Location
    New York City
    Posts
    538
    If you want a method that doesn't require a reference to an external library, which the user might not have (for instance if you're using the Access runtime), or just want a more self-contained solution, have a look at the ClipEx.Zip example on Karl Peterson's page .


    -Andrew

  4. #4
    Join Date
    Jul 2004
    Location
    UK
    Posts
    4
    That's a really helpful link. Thanks, Andrew.

  5. #5
    Join Date
    Apr 2004
    Location
    New York City
    Posts
    538
    No problem, Simon.

    You should definitely spend some time looking through Karl's site- there's tons of great stuff there that will save you hours of frustration.

    -Andrew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center