Click here to Skip to main content
11,924,995 members (52,499 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VBScript VB.NET

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
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151125.3 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2015
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