Clearing the clipboard in VBScript.

G

Gemma M

Hi all,

I am manipulating Word, using VBScript, and in the process, a large amount
of text is put in the clipboard. When the manipulation is finished, the
Word document is presented to the user. However, when the user closes word,
a prompt is displayed asking whether or not to discard the contents of the
clipboard.

How do I either clear the clipboard, or set a flag within Word, such that it
automatically discards the contents of the clipboard before on closure?

"Clipboard.Clear" appears to have no effect in VBScript.

Gem
 
G

Gemma M

Hi,

Thanks for the response. I am not running VBA code within a Word template,
I am running it in VBScript, in which I assume I use
CreateObject("VBRUN.DataObject"). However, I cannot infer from your Web
page what form I need to create for this CreateObject statement to succeed.

Gem
 
M

Malcolm Smith

Well, in Word or Office one doesn't actually need a form a reference to
the DataObject. Adding a form (and even if it's deleted afterwards) is
enough to create the reference.

- Malc
 

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

Top