Word 07 - See Clipboard Contents?

T

tpmax

Can anyone advise me of a way to see the contents of the Clipboard in Word
2007? I need to see if what's been copied correctly matches a specific
instance of data.

Thank you!
 
H

Helmut Weber

Hi,

if you show the home menu, there is "clipboard"
at the bottom left hand side, though it doesn't show exactly
what was copied according to where it
was positioned on the page.
And I didn't find a way to enlarge the rather small images.
However, even in Vista Ultimate clipbrd.exe is still there.
Just start clipbrd.exe and have a look at the display options.
 
T

tpmax

Hi Helmut,

Is there any way to do see what has been copied in Word using VBA? I'm
trying to write a segment of code that references the contents of the
clipboard for a specific match.

Thanks!
 
H

Helmut Weber

Hi tpmax,

some problems.
Here at home, I got Vista Small Business,
and can't find clipbrd.exe or
whatever it may be called under Vista Small Business.

Writing "code that references the contents of the clipboard"
is of course different from displaying the content of the clipboard
and literally seeing it.

Have a look at this example.

Sub Test5667()
Dim oDat As DataObject
Dim sTmp As String
Set oDat = New DataObject
With oDat
.GetFromClipboard
sTmp = .GetText
' Selection.TypeText sTmp ' for testing
End With
End Sub

Now you may be able to analyze stmp.

You need a reference to Microsoft Forms 2.0 Object Library.
If you can't find it in the list of available references,
insert a userform. The reference comes automatically with
the userform. After saving, you may even remove the userform
again, and the reference will stay.

HTH
--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

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