Results 1 to 2 of 2
2001-07-30, 13:05 #1nluomaGuest
Copying from the Clipboard in Word (Word 2000)
I am trying to write a macro that copies two cells of a table from a Word document and saves the information as a .rtf file. The first cell contains the name I want to use as the file name. However, I can't figure out how to get information from the clipboard into either a variable or into the Save As dialog box. According to the references I've been reading, I should be able to use a DataObject. However, either
Dim MyData as DataObject
Set MyData = New DataObject
Give me the error message "User Defined Type Not Defined".
Is the DataObject not available in Word? Is there a way to get the information from the clipboard into either a variable or into the dialog box?
2001-07-30, 15:05 #2nluomaGuest
Re: Copying from the Clipboard in Word (Word 2000)
Solved the problem after a little more research. Turns out that in Word 2000 the DataObject is not available by default to the VBA library. You need to turn it on by going to the Visual Basic Editor, selecting Tools|References and enabling MIcrosoft Forms 2.0 Object Library (it should be checked.)