Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB VBScript VB.NET
Hello,
 
I tried 20+ codes for setting text to clipboard, BUT ALL WENT IN VAIN!!
Please help me in how to set text to clipboard using VBScript only.
 

Thanks in Advance,
Ajay Varma
Posted 10-May-13 2:38am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It looks like you are out of luck.
If you look at MSDN: Key Differences Between Visual Basic for Applications and VBScript[^] at the bottom, under "System Objects" you will find this message:
 
"Although Visual Basic for Applications supports the Screen, Printer, App, Debug, Err, and Clipboard objects, VBScript supports only the Err object. Therefore, VBScript does not allow you to access such useful objects as the mouse pointer or the clipboard. You can, however, use the Err object to provide runtime error handling for your applications."
 
You will probably have to find some other way to achieve your ends.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 230
3 Aajmot Sk 191
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100