View Single Post
 
Old 06-15-2018, 03:59 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,338
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by klutch View Post
My previous code would paste into the bookmark that I had within the table. What I am now seeking to do now is put in a line of code to paste the data into the next blank space down the column of the table. This macro is for performance reviews. That being said, there is a new review after a set period of time. The table that is being pasted into will fill up over time, meaning that the pasting into the bookmark is okay for the first time but I do not want to replace the data, I want it to paste into the next blank cell (within the column of the table) if there is text in the bookmark and following cells.
When you bookmark even part of a table, you can address the entire table by that bookmark. For example:
Code:
With ActiveDocument.Bookmarks("myTable").Range.Tables(1)
  .Rows.Add
  .Cell(.Rows.Count, 1).Range.Text = "Hello World"
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote