Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Specifying table cells (WinNT4, Word97)

    Can anybody tell me how to specify a particular cell in a particular table? I've been trying variations on:

    ActiveDocument.Tables(4).Cell(6, 5).Value = "REMOVE"

    which don't work - am I missing something silly or is it really not possible to do this?
    Beryl M


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

    Re: Specifying table cells (WinNT4, Word97)

    The way you refer to a cell is correct, but Value isn't a property of a table cell in Word (it is a property of a cell in Excel). To refer to the contents of a table cell, use the Range property. For instance:

    ActiveDocument.Tables(4).Cell(6, 5).Range = "REMOVE"

    or

    ActiveDocument.Tables(4).Cell(6, 5).Range.Text = "REMOVE"

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Specifying table cells (WinNT4, Word97)

    Great, thanks - that worked! I got so close, but just couldn't work out that last bit ...
    Beryl M


Posting Permissions

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