Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro (Word 2003/2000)

    I have a macro that was written in MSWord 2000 and now I want to run it under MSWord 2003. I get a compile error on the following code: XlApp.ActiveCell.PasteSpecial xlPasteValues
    XlApp.ActiveCell.Offset(0, 1).Select
    Word doesn't recognize xlPasteValues. what can I do to correct this? This macro searches multiple word documents for certain data and copies it to Excel.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro (Word 2003/2000)

    It's most probably a references problem.
    Activate the Visual Basic Editor (if necessary)
    Select Tools | References...
    If you see a reference starting with MISSING, clear its check box.
    Scroll the list until you see Microsoft Excel 11.0 Object Library.
    Tick the check box for this entry, then click OK.
    Your code should run OK now.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Utah, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro (Word 2003/2000)

    Hans,
    Thanks, for some unknown reason my references were pointed to Microsoft Excel 5.0 object library but thats fixed now.

Posting Permissions

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