Results 1 to 2 of 2
  1. #1
    nluoma
    Guest

    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
    or
    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?
    Thanks!

  2. #2
    nluoma
    Guest

    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.)
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •