Group: microsoft.public.word.vba.general
From: Alan Stancliff
Date: Wednesday, February 20, 2008 5:11 PM
Subject: Word 2003 macro to re-place original clipboard contents

I have a WORD 2003 macro that uses the clipboard to do various things.
When the macro finishes, the clipboard contains a bit of the stuff the
macro put into it. I would like the macro to re-place whatc had
originally been in the clipboard. What I would like to have happen is this

****SEMI PSEUDO CODE****************
Sub DummyMacro()
' at beginning of macro copy
' clipboard material into variable
Dim myOriginalClipboardVariable as string
myOriginalClipboardVariable:= clipboard_contents
'
'Here macro does a bunch of stuff. A
'At the end of the macro, just before exiting
'clear the clipboard
clipboard:= ""
' then place stuff that was originally in the clipboard back
clipboard := myOriginalClipboardVariable
End Sub
******END SEMI PSEUDO CODE*********


I realize that this will not work as I have written it, but that's
because I am not yet familiar enough with VBA basics.

Would anyone mind giving me a hand here?

Regards,

Alan Stancliff