Clear Clipboard Macro

J

James Silverton

Hello, All!

I'm afraid that this crossposting since I already sent it to
m.p.word.vba but the number of posts on that group is not large
so I thought I'd also try this general group to see what
happens.

I do know how to clear the Clipboard in Word (of course :) but
it does not
seem possible to record a macro for that purpose. Pearson
Software, www.cpearson.com/excel/clipboar.htm , has a VBA
routine to do that but it involves some "Declare Function"
statements and I can't see how to insert these. My usual
technique in Word VBA may be primitive but it usually works:
record a macro and modify it. Can anyone help on the "Declare"
statements or point me to a good reference for Word VBA?

Thanks in advance

James Silverton
Potomac, Maryland, USA
 
T

Tony Jollans

I can't see your post anywhere else so I'll answer it here.

There is a way in Excel ...

ActiveCell.Copy
Application.CutCopyMode = False

which I am surprised not to see on Chip Pearson's page, but there is no Word
equivalent.

In Word you must use one of the ways Chip describes. The Declare statements
you mention must go at the top of your module, before the first procedure.
To do it simply, just copy and paste from Chip's page into a brand new
module.

If you have Word 2000 there is another way, but as it is not forward
compatible it is best left alone.
 

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