Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Cell heigh / VBA (Word 11)

    Using VBA, I want to determine the height of a table cell in which a known bookmark is located. All of my attempts have hit brick walls. What would be the best way to determine the height of the cell in which bookmark "MyCell" is located?

    Thanks,
    Richard Barrett

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

    Re: Cell heigh / VBA (Word 11)

    You could use ActiveDocument.Bookmarks("MyCell").Range.Cells(1). Height, but if the height of the table row is not set explicitly (i.e. the height is adjusted automatically), it will return wdUndefined = 9999999. If the row height is set to at least a specified height, the Height property will return the specified heifht, not the actual height.

    To get the actual row height is rather messy, see this newsgroup thread.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Cell heigh / VBA (Word 11)

    Thanks. My workaround was to use Information (wdVerticalPosition....) as well. I thought the Height property would be cleaner, but I see now why I wasn't having much luck.
    Thanks again,
    Richard

Posting Permissions

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