PDA

View Full Version : Solved: Newbie: Problems with adding text after a table



alanrenouf
07-31-2008, 02:26 AM
Hi,

Im a newbie to VBA, I am using powershell to populate a word document and have managed to insert a table and insert data into the table, on my next line i try and add text but this is always added to the first column of the table.

The cursor is staying at the top of my document once i have inserted the table and therefore the text gets put there, anyone know how i move the cursor to the end of the doc after inputting the table ?

Thanks

macropod
07-31-2008, 04:04 AM
Hi Alan,

To go to the end of the document, try:
Selection.EndKey Unit:=wdStory, Extend:=wdMove

alanrenouf
07-31-2008, 05:28 AM
Thanks, i had to use .Selection.EndKey(6) but thanks for pointing me in the right direction.