Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
VB(A)
»
Topic:
Access Clipboard from VBA?
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Access Clipboard from VBA? (Read 2767 times)
0 Members and 1 Guest are viewing this topic.
Atook
Swamp Rat
Posts: 1029
AKA Tim
WWW
Access Clipboard from VBA?
«
on:
October 23, 2007, 11:42:27 PM »
From my looking around, it looks like I need to use windows APIs for to access the clipboard. This always seems so...clumsy.
Is there anyway to do it in straight VBA from AutoCAD? I'd like to put a value from a calculation on the clipboard..
Logged
FengK
Guest
Re: Access Clipboard from VBA?
«
Reply #1 on:
October 24, 2007, 02:46:33 AM »
this can be one way:
download and install AutoIt (free) from
http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe
which comes with AutoItX (a DLL version of AutoIt v3 that provides a subset of the features of AutoIt via an ActiveX/COM and DLL interface)
among other functions, AutoItX offers ClipGet and ClipPut function. Once the .dll is registered, to use the functions is simple:
Set oAutoIt = CreateObject("AutoItX3.Control")
text = oAutoIt.ClipGet()
oAutoIt.ClipPut "I am copied to the clipboard"
Logged
Guest
Guest
Re: Access Clipboard from VBA?
«
Reply #2 on:
October 24, 2007, 08:42:49 AM »
Have you tried using the DataObject??
http://word.mvps.org/FAQs/MacrosVBA/ManipulateClipboard.htm
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
VB(A)
»
Topic:
Access Clipboard from VBA?