My last week question: how delete the Office Clipboard (XP)

A

aldo

Dear comunity
I wrote last week about my problem : How can I delete the
clipboard. I use the solutions but didn't work. Sik Sik

I work with the new: Office Clipboard under XP with excel
2002. Maeby is some special to do? My code:
Sub Macro1()
'
'OFFICE XP (with Excel 2002 and Word 2002)
'Excel I open Excel and a data file DATA.xls. I Copy a
' range value into the Office Clipboard (like: shift +
' edit ,copy like a picture). I close the ActiveWorkbook.

ChDir "N:\AM_TEST\AM_DATA"
Workbooks.Open Filename:= _
"N:\AM_TEST\DATA.xls"
Range("A1:J34").Select
Selection.CopyPicture
Appearance:=xlPrinter,Format:=xlPicture
ActiveWorkbook.Close

' I open WORD

Dim appwrd As Object
Set appwrd = CreateObject("Word.application")
appwrd.Visible = True

appwrd.ChangeFileOpenDirectory "N:\AM_TEST\"
appwrd.Documents.Open Filename:="DOCrecipient.doc",
ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False,
PasswordDocument:="", _
PasswordTemplate:="", Revert:=False,
WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
appwrd.WordBasic.EditOfficeClipboard
appwrd.Selection.Paste
appwrd.Application.WindowState = wdWindowStateMaximize
appwrd.ActiveDocument.Save
appwrd.ActiveDocument.Close
appwrd.Application.Quit
Set appwrd = Nothing


' At this place i will put the code for clean the
' Office Clipboard XP
'... but i dont' know how... sik sik


End Sub
 
J

JMay

what a refreshing answer.... Don, you must be over 50 (yrs of age);
For those of us that are that is what we would have said and done 40 years
ago
I'm not so sure we've gotten any smarter over the years with all our
trying...
Thanks for the comment.. LOL
JMay
 
D

Don Guillett

Glad you enjoyed it. Yes, I am 50+ and I just couldn't resist. I thought
that the 1st thing people did was kill the little fellow.
 
S

ste mac

aido...
l don't know if this will help you, but if you just
want to clear the clipbpoard try using the macro below..
It was one Chip pearson wrote and it worked for me..

seeya ste

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub
 
G

Guest

seeya ste
TAnk you a lot for your answer.
Somebody tell me to try that too. Tanks for all answers

Application.CutCopyMode = xlCut

that delete the clipboard but not the Office Clipboard.
Now I try to find how is possible to clear the Office
Clipboard. Maeby some Know the solution


Under Microsoft I copied that:

" The Office Clipboard and the system Clipboard
The Office Clipboard is related to the system Clipboard in
the following ways:
.. When you copy multiple items to the Office
Clipboard, the last item you copy is always copied to the
system Clipboard.
.. When you clear the Office Clipboard, the system
Clipboard is also cleared.
.. When you use the Paste command, the Paste button,
or the shortcut keys (CTRL+V), you paste the contents of
the system Clipboard, not the Office Clipboard"
 

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